Blog Archives

A better way of saving and loading objects in R

April 1, 2012
By
A better way of saving and loading objects in R

Hadley Wickham (@hadleywickham) this week mentioned on Twitter his preference for saveRDS() over the more familiar save(). Being a new function to me, I thought I’d take a look… save() and load() will be familiar to many R users. They … Continue reading →

Read more »

New version of analogue (0.8-0)

January 12, 2012
By
New version of analogue (0.8-0)

Yesterday I pushed an update of my analogue package to CRAN. The new version is 0.8-0 and contains some new functions, several bug fixes and a major change arising from additions to R 2.14.x requiring all packages to have a … Continue reading →

Read more »

Generating sets of permutations

October 21, 2011
By
Generating sets of permutations

In previous posts I discussed how to generate a single permutation from a fully-randomised or restricted permutation design using shuffle(). Here I want to briefly mention the shuffleSet() function and illustrate it’s usage. Every time you call shuffle() it has to interpret the … Continue reading →

Read more »

Generating restricted permutations with permute

October 18, 2011
By
Generating restricted permutations with permute

In a previous post I introduced the permute package and the function shuffle(). In that post I got as far as replicating R’s base function sample(). Here I’ll briefly outline how shuffle() can be used to generate restricted permutations. shuffle() … Continue reading →

Read more »

permute: a package for generating restricted permutations

October 4, 2011
By
permute: a package for generating restricted permutations

Multivariate ordination methods are commonly used in ecology to investigate patterns in species composition in space or time. Constrained ordination methods such as redundancy analysis (RDA) and canonical correspondence analysis (CCA) are effectively just multiple regressions, but we lack the … Continue reading →

Read more »

Passing non-graphical parameters to graphical functions using …

July 23, 2011
By
Passing non-graphical parameters to graphical functions using …

Argument passing via ... is a great feature of the R language, allowing you to write wrappers around existing functions that do not need to list all the arguments of the wrapped function. ... is used extensively in S3 methods … Continue reading →

Read more »

Smoothing temporally correlated data

July 21, 2011
By
Smoothing temporally correlated data

Something I have been doing a lot of work with recently are time series data, to which I have been fitting additive models to describe trends and other features of the data. When modelling temporally dependent data, we often need … Continue reading →

Read more »

Embedding a time series with time delay in R — Part II

June 14, 2011
By
Embedding a time series with time delay in R — Part II

Some months ago, I posted a function that extended the base R function embed() to allow for time delay embedding. Today, David Gonzales alerted me to an inconsistency between embed() and Embed(). The example David used was where Embed() clearly … Continue reading →

Read more »

No lake is an island: PhD Opportunity

June 14, 2011
By
No lake is an island: PhD Opportunity

NERC recently funded the formation of the UK Lake Ecological Observation Network (UKLEON) as part of the its Networks of Sensors programme. UKLEON is lead by Ian Jones at CEH Lancaster. A fully-funded PhD project is associated with the UKLEON … Continue reading →

Read more »

Additive modelling and the HadCRUT3v global mean temperature series

June 12, 2011
By
Additive modelling and the HadCRUT3v global mean temperature series

Earlier, I looked at the HadCRUT3vgl data set using generalized least squares to investigate whether the trend in temperature since 1995 was statistically significant. Here I want to follow-up one of the points from the earlier posting; namely using a … Continue reading →

Read more »