| tricubeMovingAverage {limma} | R Documentation |
Apply a moving average smoother with tricube distance weights to the columns of a matrix.
tricubeMovingAverage(x,span=0.5,full.length=TRUE)
x |
numeric vector |
span |
proportion of points included in the local window |
full.length |
logical value, should output have same number of length as input? |
This function smooths a vector (considered as a time series) using a moving average with tricube weights.
This is similar to a loess curve of degree zero, with a couple of differences:
a continuity correction is applied when computing the neighbouring points and, when full.length=TRUE, the span halves at the end points.
The filter function in the stats package is called to do the low-level calculations.
This function is used by barcodeplot to compute enrichment worms.
Numeric vector of smoothed values.
If full.length=TRUE, of same length as x.
If full.length=FALSE, has width-1 fewer rows than x.
Gordon Smyth
x <- rbinom(100,size=1,prob=0.5) plot(1:100,tricubeMovingAverage(x))