Description Usage Arguments Value Examples
View source: R/InterpolationMethod.R
linear or nearest neighbor interpolation of the irregular time series before convolution with time domain filter
1 2 | InterpolationMethod(X, fc, dt, timser.length, int.method = c("linear",
"nearest"), appliedFilter = c("gauss", "runmean", "lowpass"), k = 5)
|
X |
time series (zoo-object) |
fc |
cut-off frequency |
dt |
regular inter-observation time step of the interpolation |
timser.length |
oldest age of the time series |
int.method |
kind of interpolation (linear, nearest neighbor) |
appliedFilter |
time domain filter (gauss, runmean, lowpass) |
k |
scaling factor to define the sharpness of the lowpass |
filtered time series (zoo-object)
1 2 3 4 | timser.irreg <- zoo(rnorm(100), order.by=sort(runif(100,min=1,max=1000)))
timser.irregSmooth <- InterpolationMethod(X=timser.irreg, fc=1/50, dt=10, timser.length=max(index(timser.irreg)), int.method="linear", appliedFilter="lowpass", k=5)
plot(timser.irreg,type="l",col="black")
lines(timser.irregSmooth,col="limegreen",lwd=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.