[R] spline interpolation
Greg Snow
Greg.Snow at imail.org
Sat Feb 5 17:31:06 CET 2011
Also ?splinefun (like approxfun but using splines instead of lines).
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of David Winsemius
> Sent: Saturday, February 05, 2011 8:24 AM
> To: Asan Ramzan
> Cc: r-help at r-project.org
> Subject: Re: [R] spline interpolation
>
>
> On Feb 5, 2011, at 9:29 AM, Asan Ramzan wrote:
>
> > Hello R-help
> > I have the following data for a standard curve
> > concentration(nM),fluorescence
> > 0,48.34
> > 2,58.69
> > 5,70.83
> > 10,94.73
> > 20,190.8
> > 50,436.0
> > 100, 957.9
> >
> > (1)Is there function in R to plot a spline.
>
> ?spline
>
> > (2)How can I interpolation,say 1000 point from 0nM-100nM and store
> > this as a
> > data frame of concentration,fluorescence
>
> ?approxfun
>
> > (3)How can I modify the code below so that instead of retrieving a
> > concentration
> > with the exact value of fluorescence, it gives me concentration for
> > the value
> > that is closest to that fluorescence.
>
> ?which.min #(although I would be using "[" rather than subset for
> that purpose.)
>
> >
> > subset(df,fluorescence==200.3456,select=concentration)
> >
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at 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.
>
> David Winsemius, MD
> West Hartford, CT
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list