[R] Calculate x-values from a spline

Gunther Höning gunther.hoening at ukmainz.de
Fri Jul 28 12:39:19 CEST 2006


Hello,

I calculate splines from messured points(x,y) of an unknown function f(x).
e.g.
x <- c(0.004115, 0.012345, 0.037037, 0.111110, 0.333330, 1.000000)
y <- c(37, 50, 45, 60, 50, 66)
w <- c(0.8540541, 0.8320000, 0.8822222, 0.7983333, 0.8220000, 0.8151515) as
weights
f <- smooth.spline(x,y,w)

Now I have y-values and want to calculate the x-value(s) from this spline.
There is no further limitation to the spline, like monotonicity or anything
else..

Does anyone know how to do this ?

Gunther



gunther.hoening at ukmainz.de



More information about the R-help mailing list