Alterations to the code to run under old versions of MGCV (approx MGCV 0.9 and earlier)

Some changes to Simon Wood's mgcv library mean that a couple of minor changes are necessary to the trend-fitting code if you are using an old version of mgcv. The change comes at approximately MGCV version 0.9 (exact version unknown).

It is always recommended that you upgrade to the latest version of mgcv. If this is not possible, here are the necessary changes to make the code run under the older versions:

1. Function indsp.func

(i) Change    srow <- length(pred.df[1,])
to srow <- length(pred.df[,1])

(ii) Change    years.pred <- pred.df[reqd.entries, srow]
to years.pred <- pred.df[srow, reqd.entries]

2. Function bootstrap.func

(i) Change    srow <- length(result[1,])
to srow <- length(result[,1])

(ii) Change    pred.allyears <- result[1:Nyears, srow]
to pred.allyears <- result[srow, 1:Nyears]


Last updated:  2nd December 2004