Blog Archives

Shiny slider examples with the intrval R package

March 8, 2018
By
Shiny slider examples with the intrval R package

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.

Read more »

Phylogeny and species traits predict bird detectability

February 9, 2018
By
Phylogeny and species traits predict bird detectability

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

Read more »

PVA: Publication Viability Analysis, round 3

February 6, 2018
By
PVA: Publication Viability Analysis, round 3

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

Read more »

The progress bar just got a lot cheaper

January 23, 2018
By

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

Read more »

What is new in the intrval R package?

January 26, 2017
By

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

Read more »

Relational operators for intervals with the intrval R package

December 2, 2016
By
Relational operators for intervals with the intrval R package

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

Read more »

How to write and document %special% functions in R

November 26, 2016
By

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

Read more »

Progress bar overhead comparisons

October 15, 2016
By
Progress bar overhead comparisons

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.

Read more »

How to add pbapply to R packages

September 16, 2016
By
How to add pbapply to R packages

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

Read more »

What is the cost of a progress bar in R?

September 11, 2016
By
What is the cost of a progress bar in R?

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

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)