Dear R Users,

I've got a strange problem, which I do not really understand:

when I use na.spline from the zoo package, the option na.rm is just being
ignored, see this adjusted example from the na.spline help page:
########################
d0 <- as.Date("2000-01-01")
z <- zoo(c(NA, 11, 13, NA, 15, NA), d0 + 1:6)
na.spline(z)
na.spline(z, na.rm = FALSE)
na.spline(z, na.rm = T)
#######################

In all 3 cases, the output looks like this with the trailing NA being
replaced:
2000-01-02 2000-01-03 2000-01-04 2000-01-05 2000-01-06 2000-01-07
  8.333333  11.000000  13.000000  14.333333  15.000000  15.000000

Am I missing something here?
Any help is very much appreciated...

Thanks,

       Katharina





###############
Background Info:
###############
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252
 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] nlme_3.1-109   zoo_1.7-10     xlsx_0.5.1     xlsxjars_0.5.0 rJava_0.9-5


loaded via a namespace (and not attached):
[1] grid_3.0.1      lattice_0.20-15 tools_3.0.1

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to