[R] Calculate x-values from a spline

From: Gunther Höning <gunther.hoening_at_ukmainz.de>
Date: Fri 28 Jul 2006 - 20:39:19 EST


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
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 ?



R-help@stat.math.ethz.ch 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. Received on Fri Jul 28 21:59:40 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 29 Jul 2006 - 00:17:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.