smooth {eda} | R Documentation |
Median Smoothing
Description
This function applies Tukey's smoothing method 3RSR
to x
.
Usage
smooth(x)
Arguments
x |
a vector or time series |
Value
A vector or time series containing the smoothed values. Note that there are other smoothing methods which provide rather better results. This one was designed for hand calculations.
Note
3R stands for Repeated running median
s
of 3.
References
Tukey, J. W. (1977). Exploratory Data Analysis, Reading Massachusetts: Addison-Wesley.
See Also
lowess
; loess
,
supsmu
and
smooth.spline
in package ‘modreg’.
Examples
library(eda)
data(presidents)
presidents[is.na(presidents)] <- 0
plot(presidents)
lines(smooth(presidents))