Blog Archives

My aversion to pipes

June 3, 2015
By

At the risk of coming across as even more of a curmudgeonly old fart than people already think I am, I really do dislike the current vogue in R that is the pipe family of binary operators; e.g. %>%. Introduced by Hadley Wickham and popularised and advanced via the magrittr package by Stefan Milton Bache, the basic idea...

Read more »

Something is rotten in the state of Denmark

June 2, 2015
By

On Twitter and elsewhere there has been much wailing and gnashing of teeth for some time over one particular aspect of the R ecosphere: CRAN. I’m not here to argue that everything is peachy — far from it in fact — but I am going to argue that the problems we face do not begin and end with...

Read more »

Drawing rarefaction curves with custom colours

April 16, 2015
By
Drawing rarefaction curves with custom colours

I was sent an email this week by a vegan user who wanted to draw rarefaction curves using rarecurve() but with different colours for each curve. The solution to this one is quite easy as rarecurve() has argument col so the user could supply the appropriate vector of colours to use when plotting. However, they wanted to distinguish all...

Read more »

Harvesting Canadian climate data

January 14, 2015
By
Harvesting Canadian climate data

In December I found myself helping one of our graduate students with a data problem; for one of their thesis chapters they needed a lot of hourly climate data for a handful of stations around Saksatchewan. All of this data was and is available for download from the Government of Canada’s website, but with one catch; you had to...

Read more »

Analysing a randomised complete block design with vegan

November 3, 2014
By
Analysing a randomised complete block design with vegan

It has been a long time coming. Vegan now has in-built, native ability to use restricted permutation designs when testing effects in constrained ordinations and in range of other methods. This new-found functionality comes courtesy of Jari (mainly) and my efforts to have vegan permutation routines use the permute package. Jari also cooked up a standard interface...

Read more »

analogue 0.14-0 released

October 14, 2014
By

A couple of week’s ago I packaged up a new release of analogue, which is available from CRAN. Version 0.14-0 is a smaller update than the changes released in 0.12-0 and sees a continuation of the changes to dependencies to have packages in Imports rather than Depends. The main development of analogue now takes place on github...

Read more »

Simulating species abundance data with coenocliner

July 31, 2014
By
Simulating species abundance data with coenocliner

Coenoclines are, according to the Oxford Dictionary of Ecology (Allaby 1998), “gradients of communities (e.g. in a transect from the summit to the base of a hill), reflecting the changing importance, frequency, or other appropriate measure of different species populations”. In much ecological research, and that of related fields, data on these coenoclines are collected and analyzed in a variety...

Read more »

Simultaneous confidence intervals for derivatives of splines in GAMs

June 16, 2014
By
Simultaneous confidence intervals for derivatives of splines in GAMs

Last time out I looked at one of the complications of time series modelling with smoothers; you have a non-linear trend which may be statistically significant but it may not be increasing or decreasing everywhere. How do we identify where in the series the data are changing? In that post I explained how we can use the first...

Read more »

Identifying periods of change in time series with GAMs

May 15, 2014
By
Identifying periods of change in time series with GAMs

In previous posts (here and here) I looked at how generalized additive models (GAMs) can be used to model non-linear trends in time series data. In my previous post I extended the modelling approach to deal with seasonal data where we model both the within year (seasonal) and between year (trend) variation with separate smooth functions....

Read more »

Modelling seasonal data with GAMs

May 9, 2014
By
Modelling seasonal data with GAMs

In previous posts I have looked at how generalized additive models (GAMs) can be used to model non-linear trends in time series data. At the time a number of readers commented that they were interested in modelling data that had more than just a trend component; how do you model data collected throughout the year over many years with...

Read more »