rmean {paleoDiv} | R Documentation |
Calculate a rolling mean for a vector x.
Description
Calculate a rolling mean for a vector x.
Usage
rmean(x, width = 11)
Arguments
x |
Numeric vector for which to calculate the rolling mean. |
width |
Width of the interval over which to calculate rolling mean values. Should be an uneven number (even numbers are coerced into the next-higher uneven number) |
Value
A numeric vector of the same length as x containing the calculated rolling means, with the first and last few values being NA (depending on the setting for width)
Examples
rmean(x=c(1,2,3,4,5,6),width=5)
[Package paleoDiv version 0.3.0 Index]