runner: Calculate a running summary

Description Usage Arguments Examples

View source: R/mMisc.R

Description

Running summary (mean, sum, etc) of a vector over a moving window.

Usage

1
runner(vec, w, FUN)

Arguments

vec

Vector to summarize

w

window (length) for moving summary

FUN

summary function

Examples

1
2
# weekly moving average
runner(daily, w = 7, FUN = mean)

townleym/mMisc documentation built on May 6, 2019, 10:52 a.m.