I'm assuming that you meant to write

s <- smooth.spline(x, y)

You can look at the code for the predict method for smooth.spline by 
typing

getAnywhere(predict.smooth.spline)

If a new value is provided (i.e., the 500 in your example) then the 
predict method for smooth.spline.fit is applied to the spline object's fit 
(i.e., s$fit in your example).

You can look at the code for the predict method for smooth.spline.fit by 
typing

getAnywhere(predict.smooth.spline.fit)

Jean



Jesper wrote on 08/25/2011 03:03:09 AM:
> 
> Hi,
> 
> I want to use the result from smooth.spline outside R.
> 
> I take my data ,which is 180 point stored in x and y
> 
> s <- smooth(x,y)
> 
> I can know use to e.g. find the interpolated value at e.g. x=500
> 
> predict (s,500)
> 
> My problem is, that i don't know how to implement the predict function. 
I
> have looked at literature, but i cannot connect the output of the
> smooth.spline() to an actual spline model..
> 
> Has anyone tried it?
> 
> Br
> 
> Jesper
> 
        [[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