[R] First Derivative of Data Matrix
spencerg
spencer.graves at prodsyse.com
Mon Apr 13 01:42:59 CEST 2009
However, estimating derivatives from differencing data amplifies
minor errors. Less noisy estimates can be obtained by first smoothing
and then differentiating the smooth. The "fda" package provides
substantial facilities for this.
Hope this helps.
Spencer Graves
David Winsemius wrote:
> delta(index) is identically 1, so taking first differences is all that
> is needed. If the dtatframe's name is df then:
>
> df$dacflong_dx <- c(NA, diff(acflong)) # the slash would not be a
> legal character in a variable name unless you jumped through some
> hoops that appear entirely without value
>
> If you want to get rid of the first line of df then
>
> df[-1]
>
More information about the R-help
mailing list