# Posts

#### Fitting removal models with the detect R package

August 30, 2018

In a paper recently published in the Condor, titled Evaluating time-removal models for estimating availability of boreal birds during point-count surveys: sample size requirements and model complexity, we assessed different ways of controlling for point-count duration in bird counts using data from the Boreal Avian Modelling Project. As the title indicates, the paper describes a cost-benefit analysis to make recommendations about when to use different types of the removal model. The paper is open access, so feel free to read the whole paper here.

#### Shiny slider examples with the intrval R package

March 08, 2018

The intrval R package is lightweight (~11K), standalone (apart from importing from graphics, has exactly 0 non-base dependency), and it has a very narrow scope: it implements relational operators for intervals — very well aligned with the tiny manifesto. In this post we will explore the use of the package in two shiny apps with sliders.

#### Phylogeny and species traits predict bird detectability

February 09, 2018

It all started with this paper in Methods in Ecol. Evol. where we looked at detectability of many species. So we wanted to use life history traits to validate our results. But we had to cut the manuscript, and there was this leftover with some neat patterns, but without much focus. It took a few years, and the most positive peer-review experience ever, and the paper is now early view in Ecography. This post is a quick summary of the goodies stuffed inside the lhreg R package that makes the whole analysis reproducible, and provides some functions for similar PGLMM models.

#### PVA: Publication Viability Analysis, round 3

February 06, 2018

A friend and colleague of mine, Péter Batáry has circulated news from Nature magazine about the EU freezing innovation funds to Bulgaria. The article had a figure about publication trends for Bulgaria, compared with Romania and Hungary. As I have blogged about such trends in ecology before (here and here), I felt the need to update my PVA models with two years worth of data from WoS.

#### The progress bar just got a lot cheaper

January 23, 2018

The pbapply R package that adds progress bar to vectorized functions has been know to accumulate overhead when calling parallel::mclapply with forking (see this post for more background on the issue). Strangely enough, a GitHub issue held the key to the solution that I am going to outline below. Long story short: forking is no longer expensive with pbapply, and as it turns out, it never was.

#### What is new in the intrval R package?

January 26, 2017

An update (v 0.1-1) of the intrval package was recently published on CRAN. The package simplifies interval related logical operations (read more about the motivation in this post). So what is new in this version? Some of the inconsistencies in the 1st CRAN release have been cleaned up, and I have been pushed hard (see GitHub issue to implement all the 16 interval-to-interval operators. These operators define the open/closed nature of the lower/upper limits of the intervals on the left and right hand side of the o in the middle as in c(a1, b1) %[]o[]% c(a2, b2).

#### Relational operators for intervals with the intrval R package

December 02, 2016

I recently posted a piece about how to write and document special functions in R. I meant that as a prelude for the topic I am writing about in this post. Let me start at the beginning. The other day Dirk Eddelbuettel tweeted about the new release of the data.table package (v1.9.8). There were new features announced for joins based on %inrange% and %between%. That got me thinking: it would be really cool to generalize this idea for different intervals, for example as x %[]% c(a, b).

#### How to write and document %special% functions in R

November 26, 2016

I spend a considerable portion of my working hours with data processing where I often use the %in% R function as x %in% y. Whenever I need the negation of that, I used to write !(x %in% y). Not much of a hassle, but still, wouldn’t it be nicer to have x %notin% y instead? So I decided to code it for my mefa4 package that I maintain primarily to make my data munging time shorter and more efficient. Coding a %special% function was no big deal. But I had to do quite a bit of research and trial-error until I figured out the proper documentation. So here it goes.

#### Effects of industrial sectors on species abundance in Alberta

November 05, 2016

Transformation of native habitat by human activity is the main cause of global biodiversity loss. Humans have visibly transformed 27% of Alberta to date. The effects of these changes depend on the species, and the nature and extent of the human activities in question. Teasing apart these factors in a cumulative effects framework are of the focus of several initiatives and organizations in Alberta. The Alberta Biodiversity Monitoring Institute (ABMI) collects data and produces information that helps attributing the effects of human activities on species to different industrial sectors, or as we call them, sector effects.

October 15, 2016

As a testament to my obsession with progress bars in R, here is a quick investigation about the overhead cost of drawing a progress bar during computations in R. I compared several approaches including my pbapply and Hadley Wickham’s plyr.

#### How to add pbapply to R packages

September 16, 2016

As of today, there are 20 R packages that reverse depend/import/suggest (3/14/3) the pbapply package. Current and future package developers who decide to incorporate the progress bar using pbapply might want to customize the type and style of the progress bar in their packages to better suit the needs of certain functions or to create a distinctive look. Here is a quick guide to help in setting up and customizing the progress bar.

#### What is the cost of a progress bar in R?

September 11, 2016

The pbapply R package adds progress bar to vectorized functions, like lapply. A feature request regarding progress bar for parallel functions has been sitting at the development GitHub repository for a few months. More recently, the author of the pbmcapply package dropped a note about his implementation of forking functionality with progress bar for Unix/Linux computers, which got me thinking. How should we add progress bar to snow type clusters? Which led to more important questions: what is the real cost of the progress bar and how can we reduce overhead on process times?

#### My first blog post was a guest post

August 30, 2016

The title says it all. I wrote this piece about Publication Viability Analysis pondering about a pattern that I observed while looking at Hungarian ecologists publication output through time using the Web of Science database (the original post is in Hungarian).

August 23, 2016

This post was prompted by this blog about using the cranlogs package by Gabor Csardi. But my own interest as long time package developer dates back to this post by Ben Bolker. I like to see that my packages are being used. So I thought why stop at counting downloads and plotting the past. Why not predict into the future?

#### NACCB 2016 talk on cumulative effects monitoring

July 18, 2016

I was invited to represent ABMI at the Multi-taxa Monitoring in North America symposium, North American Congress for Conservation Biology, Madison, Wisconsin, July 18, 2016. The symposium was organized by Michael Lucid (Idaho Department of Fish and Game). It was great to see all the good work happening in North America, and the commitment to push the agenda of multi-taxa monitoring against critics and scarce funding (of course Alberta ‘has all the oil money’).

#### Data set with all the conceivable errors

June 14, 2016

As I was preparing for an R intro course I came up with the idea of creating a fake data set that is stuffed full of all the conceivable errors one can imagine. Just in case my imagination falls short, I’d appreciate all the suggestions in the comments so that I can incorporate more errors.

#### wac2wav converter

March 14, 2016

Automated acoustic monitoring is gaining momentum worldwide. Alberta is stepping up to the game by implementing automated recording unit (ARU) based monitoring programs. An improved command line tool is here to help in the process.

#### Timer progress bar added to pbapply package

March 04, 2016

pbapply is a lightweight R extension package that adds progress bar to vectorized R functions (*apply). The latest addition in version 1.2-0 is the timerProgressBar function which adds a text based progress bar with timer that all started with this pull request.

#### mefa4 R package update

March 02, 2016

The mefa4 R package is aimed at efficient manipulation of very big data sets leveraging sparse matrices thanks to the Matrix package. The recent update (version 0.3-3) of the package includes a bugfix and few new functions to compare sets and finding dominant features in compositional data as described in the ChangeLog.

#### Personal website revamped

February 27, 2016

It all started with my site based on the SinglePaged theme broken by the Jekyll 3.0 update on GitHub pages. Although Karthik Raman sent a nice pull request with a fix, I opted to revamp my site instead of fixing the old theme.

#### Hierarchical models for conservation biologists made easy

February 25, 2016

One-day short course at NACCB congress in Madison, WI, on July 16th, with Peter Solymos and Subhash Lele.

#### Version 3 of the ABMI Species Website released

October 20, 2015

Information on spatial distribution, habitat associations, responses to human footprint, and predicted relative abundance distributions for 2285 species in Alberta by the Alberta Biodiversity Monitoring Institute (ABMI) at http://species.abmi.ca.

#### Hierarchical modeling workshop in Monpellier

August 28, 2015

One-day teaching workshop at ICCB/ECCB congress in Monpellier on August 1st, 2015.

#### What can we do with a single survey?

August 04, 2015

We presented a poster at the ICCB/ECCB 2015 congress in Montpellier, France, that summarized our research on single visit methodology.

#### Cumulative effects of Oil Sands development on songbirds

May 05, 2015

Habitat associations and responses to human footprint were quantified for several breeding bird species as part of a collaborative modeling effort that synthesized the available information in Alberta.

#### Human footprint change during the last decade

February 17, 2015

The ABMI hosted its 2nd annual Speakers’ Series ‘Better Environmental Management Through Monitoring 2015’ to understand distribution of biodiversity and to inform sustainable resource development and biological conservation in Alberta.

#### ABMI Species Website launched

December 20, 2014

Alberta Biodiversity Monitoring Institute (ABMI) monitors species and their habitats to understand distribution of biodiversity and to inform sustainable resource development and biological conservation in Alberta. The species website can be accessed at http://species.abmi.ca.

#### Budapest Use R!

July 16, 2014

I presented a guest lecture ‘Data cloning: bridging the Bayesian and frequentist statistical paradigms’, at the Budapest R User Group meetup, Budapest, Hungary.

#### ISEC 2014 in Montpellier

July 01, 2014

Discussing problems vs. finding solutions: an operational framework for dealing with imperfect detection in species distribution modelling, International Statistical Ecology Conference 2014, Montpellier, France.

#### Bird modeling in the Oil Sands

May 05, 2014

Development of predictive models for migratory landbirds and estimation of cumulative effects of human development in the oil sands areas of Alberta, Joint Oil Sands Monitoring: Cause-Effects Assessment of Oil Sands Activity on Migratory Landbirds, Edmonton, AB, 2014.

#### Fitting removal models with the detect R package

In a paper recently published in the Condor, titled Evaluating time-removal models for estimating availability of boreal birds during point-count surveys: sample size requirements and model complexity, we assessed different ways of controlling for point-count duration in bird counts using data from the Boreal Avian Modelling Project. As the title indicates, the paper describes a cost-benefit analysis to make recommendations about when to use different types of the removal model. The paper is open access, so feel free to read the whole paper here.