Learn R Programming

paleoMAS (version 2.0-1)

run.mean: Moving averages

Description

This function calculates moving averages for data series.

Usage

run.mean(x, window)

Arguments

x
A vector with the data series.
window
Number of observations to be taken into account in the estimation of the local mean.

Value

Returns a vector with the estimated local averages.

Examples

Run this code
run.mean(c(1:10),window=3)

Run the code above in your browser using DataLab