running_average | R Documentation |
Running average
running_average(vec, winlength, keep.na = TRUE)
vec |
Vector to perform running average on |
winlength |
Averaging window length |
keep.na |
Should NAs at beginning and end be kept? (They start at the end) |
Running average
vec <- 1:4
running_average(vec, 2)
running_average(vec, 3)
running_average(vec, 2, keep.na=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.