InterpolationMethod: InterpolationMethod

Description Usage Arguments Value Examples

View source: R/InterpolationMethod.R

Description

linear or nearest neighbor interpolation of the irregular time series before convolution with time domain filter

Usage

1
2
InterpolationMethod(X, fc, dt, timser.length, int.method = c("linear",
  "nearest"), appliedFilter = c("gauss", "runmean", "lowpass"), k = 5)

Arguments

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

Value

filtered time series (zoo-object)

Examples

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)

EarthSystemDiagnostics/corit documentation built on May 29, 2019, 1:39 p.m.