many thanks for the enlightenment - I guess I completely misunderstood the na.rm option here...
On 18 June 2013 00:50, Gabor Grothendieck <ggrothendi...@gmail.com> wrote: > On Mon, Jun 17, 2013 at 6:23 PM, Katharina May > <may.kathar...@googlemail.com> wrote: > > 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... > > > > If the result of the spline interpolation still results in NAs then > na.rm=TRUE will remove any leading NAs. It may be that all currently > supported methods produce no NAs in which case this argument would > only be there for compatability with na.approx and in case future > additional spline methods do produce NAs. > [[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.