smoothXTS: Smooth a time series

View source: R/smoothxts.r

smoothXTSR Documentation

Smooth a time series

Description

Smooth a time series, optionally within two boundaries.

Usage

smoothXTS(x, timesteps = 24, lowerbound = NULL, upperbound = NULL)

Arguments

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.

Details

It uses the function embed.fullextent to smooth the timeseries

Value

An xts object

Author(s)

Simon Frey

See Also

embed.fullextent

Examples

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)

freysimon/TigR documentation built on April 20, 2024, 9:28 p.m.