compDeriv | R Documentation |
Computes the successive derivatives from one single time series, with the Savitzky-Golay approach (1964).
compDeriv(TS, nDrv, tstep, winL = 9)
TS |
A single time series provided as a single vector. |
nDrv |
The number of derivatives to be computed from the input
|
tstep |
Sampling Time of the input time series |
winL |
The local window length used for computing the derivatives [1-2]. |
drv A matrix containing the original variable (smoothed by the
filtering process) in the first comlumn and its nDrv
+1 first derivatives
in the next columns (note that winL
values of the original time series
will be lost both at the begining and the end of the time series due to boundary
effect).
Sylvain Mangiarotti
[1] Savitzky, A.; Golay, M.J.E.,
Smoothing and Differentiation of Data by Simplified Least Squares Procedures.
Analytical Chemistry 36 (8), 1627-1639, 1964.
[2] Steinier J., Termonia Y., Deltour, J.
Comments on smoothing and differentiation of data by simplified least square procedure.
Analytical Chemistry 44 (11): 1906-1909, 1972.
gloMoId
, gPoMo
, poLabs
# load data:
data(NDVI)
# Compute the derivatives:
drv <- compDeriv(NDVI[,1], nDrv = 3, tstep = 1/125)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.