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]


______________________________________________
[email protected] 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.

Reply via email to