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
These operators define the open/closed nature of the lower/upper
limits of the intervals on the left and right hand side of the
in the middle as in
c(a1, b1) %o% c(a2, b2).
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
%between%. That got me thinking: it would be really cool to generalize this idea for different intervals, for example as
x %% c(a, b).
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.
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.
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.
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.
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?
opticut: Likelihood based optimal partitioning for indicator species analysis
intrval: Relational operators for intervals
pbapply: Adding progress bar to '*apply' functions
vegan: Community ecology package
ResourceSelection: Resource selection (probability) functions for use-availability data
mefa4: Multivariate data handling with S4 classes and sparse matrices
detect: Analyzing wildlife data with detection error
dclone: Data cloning and MCMC tools for maximum likelihood methods
dcmle: Hierarchical models made easy with data cloning
PVAClone: Population viability analysis with data cloning
sharx: Models and data sets for the study of species-area relationships
mefa: Multivariate data handling in ecology and biogeography
Van Wilgenburg, S. L., Sólymos, P., Kardynal, K. J. and Frey, M. D., 2017. Paired sampling as a pragmatic approach toward comparability between point counts conducted by humans versus acoustic recorders. Avian Conservation and Ecology, xx:xx–xx. — journal website.
Fehér, Z., Majoros, G., Ötvös, S., Bajomi, B., and Sólymos, P., 2017. Successful reintroduction of the endangered Black Nerite, Theodoxus prevostianus (C. Pfeiffer, 1828) (Mollusca: Gastropoda: Nertidae) in Hungary. Journal of Molluscan Studies, xx:xx–xx. — journal website.
Kisfali, M., Sólymos, P., Nagy, A., Rácz, I. A., Horváth, O. and Sramkó, G., 2017. A morphometric and molecular study of the genus Pseudopodisma (Orthoptera: Acrididae). Acta Zoologica Academiae Scientiarum Hungaricae, xx:xx–xx. — journal website.
Yip, D. A., Bayne, E. M., Sólymos, P., Campbell, J., and Proppe, J. D., 2017. Sound attenuation in forested and roadside environments: implications for avian point count surveys. Condor, 119:73–84. — journal website.
Dénes, F., Sólymos, P., Lele, S. R., Silveira, L., and Beissinger, S., 2017. Biome scale signatures of land use change on raptor abundance: insights from single-visit detection-based models. Journal of Applied Ecology, xx:xx–xx. — journal website —
detect R package.