ma: Moving Average Calculator

Description Usage Arguments Value Examples

Description

Function to calculate the moving average of a given numeric vector. The order of the moving average may be customized by the user (man argument).

Usage

1
ma(data, man = 10, warnings = FALSE)

Arguments

data

A numeric vector (e.g. a numeric column of a dataframe).

man

An integer value specifying the order of the moving average applied to the data. By default, man = 10.

warnings

A logical value specifying the show of warning messages. By default, warnings = FALSE.

Value

This function returns a vector with the moving average of the input data.

Examples

1
2
data("munich_pollen")
ma(data = munich_pollen$Betula, man = 10, warnings = FALSE)

AeRobiology documentation built on June 3, 2019, 9:03 a.m.