Re: [R] Calculate x-values from a spline

From: Cuvelier Etienne <ecu_at_info.fundp.ac.be>
Date: Fri 28 Jul 2006 - 22:31:37 EST

Gunther Höning a écrit :
> 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 ?

Perhaps this ?

finv = splinefun(f$y,f$x)

>
> Gunther
>
>
>
> gunther.hoening@ukmainz.de
>
> ______________________________________________
> 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.
>
>
>

-- 
===============================================
Cuvelier Etienne
Assistant
FUNDP - Institut d'Informatique
rue Grandgagnage, 21   B-5000 Namur (Belgique)
tel: 32.81.72.49.93    fax: 32.81.72.49.67
===============================================


--

______________________________________________
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 22:36:48 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 - 02:16:10 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.