smoothXTS | R Documentation |
Smooth a time series, optionally within two boundaries.
smoothXTS(x, timesteps = 24, lowerbound = NULL, upperbound = NULL)
x |
an xts object. |
timesteps |
integer. Number of timestpes used for smoothing |
upperbound |
numeric. (Optional). Upper boundary. Below this, smoothing will be performed. |
lowerbund |
numeric. (Optional) Lower boundary. Above this smoothing will be performed. |
It uses the function embed.fullextent
to smooth the timeseries
An xts object
Simon Frey
embed.fullextent
data(runoff)
x <- runoff[,1]
summary(x)
X <- smoothXTS(x)
summary(X)
X <- smoothXTS(x, lowerbound = quantile(x,0.2), upperbound = quantile(x, 0.8))
summary(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.