View source: R/utils-infercna.R
runMean | R Documentation |
Apply a rolling window mean to a matrix or vector.
runMean(m, k = 100, endrule = "mean", align = "center", verbose = T)
m |
a numeric vector or matrix. If the latter, each column will be processed separately. |
k |
width of rolling window. Default: 100 |
endrule |
character string indicating how the values at the beginning and the end of the data should be treated. One of "mean", "trim", "keep", "constant". See caTools::runmean for more details. Default: 'mean' |
align |
specifies whether result should be centered (default), left-aligned or right-aligned. See caTools::runmean for more details. Default: 'center' |
verbose |
print progress messages. Default: TRUE |
a numeric vector or matrix of the same size as <m>. Only in case of endrule=trim, the output vectors will be shorter and output matrices will have fewer rows.
runmean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.