Running examples in ‘seas-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: change
> ### Title: Find seasonal and annual changes between two data sets
> ### Aliases: change
> ### Keywords: utilities datagen
> 
> ### ** Examples
> 
> data(mscdata)
> dat1 <- mksub(mscdata, id=1108447, start=1975, end=1984)
> dat2 <- mksub(mscdata, id=1108447, start=1985, end=1995)
> 
> # A few plot functions to make thing easy
> plot.ch <- function(x, main, h, col) {
+   main <- paste(main, "between 1975-1984 and 1985-1994", sep="\n")
+   barplot(x, main=main)
+   abline(h=c(0, h), col=c(1, col), lty=c(1, 2))
+ }
> plot.abs <- function(x, col="red", abs="abs", ann.abs="ann.abs") {
+   main <- sprintf("Absolute change in %s", x$long.name[[1]])
+   plot.ch(x[[abs]], main, x[[ann.abs]], col)
+ }
> plot.rel <- function(x, col="orange", rel="rel", ann.rel="ann.rel") {
+   main <- sprintf("Relative change in %s", x$long.name[[1]])
+   plot.ch(x[[rel]], main, x[[ann.rel]], col)
+ }
> plot.std <- function(x, col="purple") {
+   main <- sprintf("Relative change in the\nstandard deviation of %s",
+                   x$long.name[[1]])
+   plot.ch(x$sprd.rel, main, x$ann.sprd.rel, col)
+ }
> 
> # Minimum temperature
> ch <- change(dat1, dat2, "t_min")
> str(ch)
List of 15
 $ orig        :List of 2
  ..$ : chr "dat1"
  ..$ : chr "dat2"
 $ var         :List of 2
  ..$ : chr "t_min"
  ..$ : chr "t_min"
 $ id          :List of 2
  ..$ : chr "1108447"
  ..$ : chr "1108447"
 $ name        :List of 2
  ..$ : chr "VANCOUVER INT'L A"
  ..$ : chr "VANCOUVER INT'L A"
 $ year.range  :List of 2
  ..$ : int [1:2] 1975 1984
  ..$ : int [1:2] 1985 1995
 $ long.name   :List of 2
  ..$ : chr "daily minimum temperature"
  ..$ : chr "daily minimum temperature"
 $ units       :List of 2
  ..$ : chr "°C"
  ..$ : chr "°C"
 $ width       : chr "mon"
 $ cent.fun    : chr "mean"
 $ sprd.fun    : chr "sd"
 $ disc        : logi FALSE
 $ abs         : Named num [1:12] 0.401 -0.998 0.31 1.332 0.997 ...
  ..- attr(*, "names")= chr [1:12] "Jan" "Feb" "Mar" "Apr" ...
 $ sprd.rel    : Named num [1:12] 1.03 1.27 1.01 1 1.09 ...
  ..- attr(*, "names")= chr [1:12] "Jan" "Feb" "Mar" "Apr" ...
 $ ann.abs     : num 0.543
 $ ann.sprd.rel: num 1.04
 - attr(*, "class")= chr "seas.change"
> plot.abs(ch)
> plot.std(ch)
> # Cannot do ch$rel ; since div/0!
> 
> # Precipitation
> ch2 <- change(dat1, dat2, "precip", width="DJF", disc=TRUE)
Error in `[<-.data.frame`(`*tmp*`, ann.na, var, value = NA) : 
  replacement has 1 row, data has 0
Calls: change -> seas.sum -> [<- -> [<-.data.frame
Execution halted