movingAve2: Moving / rolling average (v2, filter)

View source: R/CodeAndRoll2.R

movingAve2R Documentation

Moving / rolling average (v2, filter)

Description

Calculates the moving / rolling average of a numeric vector, using filter().

Usage

movingAve2(x, n = 5)

Arguments

x

A numeric vector.

n

The size of the moving window. Defaults to 5.

Value

A vector of the moving averages.

Examples

movingAve2(1:5)


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.