ma {AeRobiology}R Documentation

Moving Average Calculator

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

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

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

[Package AeRobiology version 2.0.1 Index]