Publications by Peter Solymos

Progress bar overhead comparisons

15.10.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. Let’s compare the good old lapply function from base R, a custom-made variant called lapply_pb that was...

1929 sym R (1660 sym/2 pcs) 2 img

How to write and document %special% functions in R

26.11.2016

I spend a considerable time 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 ma...

1493 sym R (1054 sym/4 pcs)

Relational operators for intervals with the intrval R package

02.12.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% a...

4292 sym R (2763 sym/6 pcs) 4 img 3 tbl

What is new in the intrval R package?

26.01.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 al...

2437 sym R (128 sym/1 pcs) 2 tbl

The progress bar just got a lot cheaper

23.01.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 wi...

2791 sym R (3840 sym/5 pcs)

PVA: Publication Viability Analysis, round 3

06.02.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 mod...

1851 sym R (1510 sym/1 pcs) 2 img 1 tbl

Phylogeny and species traits predict bird detectability

09.02.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...

3839 sym 2 img

Shiny slider examples with the intrval R package

08.03.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. The fir...

1531 sym R (2160 sym/2 pcs) 4 img

Shiny slider examples with the intrval R package

08.03.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. The fir...

1533 sym R (2160 sym/2 pcs) 4 img

Fitting removal models with the detect R package

30.08.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 titl...

11458 sym R (6979 sym/14 pcs) 8 img