movingAverage {RareVariantVis} | R Documentation |
Function calculates moving average from a vector of numeric values.
movingAverage(x, n, centered)
x |
a vector of numeric values for which moving average is computed |
n |
numeric value giving the frame length for moving average |
centered |
logic variable indicating if moving average should be centered (default = FALSE) |
comp1 |
function returns vector of moving average values |
Winston Chang
movingAverage(1:20, n=3, centered=FALSE)