runavg: Create a running average of past values for a historical time...

View source: R/runavg.R

runavgR Documentation

Create a running average of past values for a historical time series.

Description

Create a running average of past values for a historical time series.

Usage

runavg(z, k, na.rm = TRUE)

Arguments

z

A time series or vector of values

k

Number of previous terms to average

na.rm

Remove the inital NA values (default is TRUE)

Value

A time series (or vector) of the averages taken k at a time with the first value at time k+1


statmanrobin/ts343AJ documentation built on May 23, 2022, 4:34 p.m.