Re: [R] differentiating a numeric vector

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 05 Mar 2008 16:18:07 -0500

Check out ?splinefun

On Wed, Mar 5, 2008 at 3:18 PM, Levi Waldron <leviwaldron_at_gmail.com> wrote:
> What functions exist for differentiating a numeric vector (in my case
> spectral data)? That is, experimental data without an analytical
> function. ie,
>
> > x <- seq(1,10,0.1)
> > y=x^3+rnorm(length(x),sd=0.01) #although the real function would be nothing simple like x^3...
> > derivy <- ....
>
> I know I could just use diff(y) but it would be nice to estimate
> derivatives at the endpoints, calculate higher-order derivatives, and
> maybe have some smoothing options ie by differentiating a spline or
> something like that.
>
> ______________________________________________
> 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.
>



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. Received on Wed 05 Mar 2008 - 21:26:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 21:30:20 GMT.

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

list of date sections of archive