Hello, I need some help in differencing a time series.

For example I have a data set with 100 data points. I
need to create a new dataset that consists of the
difference of two succeeding data points.

something akin to this formula in java:
for (int i = 0, i < 100, i++)
{
  newdataset[i] = olddataset[i] - olddataset[i-1]
}

any help is appreciated. Thanks

______________________________________________
[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

Reply via email to