[R] spline bug ?

FWR mail at fwr.on.ca
Fri Oct 4 03:24:42 CEST 2002


# Is this a bug or something I don't understand?
spline(date, stor, n=52, xmin=mind, xmax=maxd)
# gives length(x) of 53 ????, but y has the expected length of 52 
# Shouldn't they be the same length? From help (spline):
# spline returns a list containing components x and y which give the 
# ordinates where interpolation took place and the interpolated values

# xmin and xmax are inside min(date) and max(date) if that's important 

# If I construct the x vector separately with length 52, approx works fine 
approx(date,stor,xout=x)
# Actually, I constructed the x vector used above with:
x<-spline(date, stor, n=51, xmin=mind, xmax=maxd)$x
# note the use of 51, not 52

#Thanks, Bruce L.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list