Description Usage Arguments Details Value Author(s) Examples
View source: R/movingAverageByCol.R
Apply a moving average smoother to the columns of a matrix.
1 | movingAverageByCol(x, width=5, full.length=TRUE)
|
x |
numeric matrix |
width |
integer, width of window of rows to be averaged |
full.length |
logical value, should output have same number of rows as input? |
If full.length=TRUE, narrower windows are used at the start and end of each column to make a column of the same length as input.
If FALSE, all values are averager of width input values, so the number of rows is less than input.
Numeric matrix containing smoothed values.
If full.length=TRUE, of same dimension as x.
If full.length=FALSE, has width-1 fewer rows than x.
Gordon Smyth
1 2 | x <- matrix(rpois(20,lambda=5),10,2)
movingAverageByCol(x,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.