runMean: Smooth a numeric vector using moving window averaging.

Description Usage Arguments Value

Description

Smooth a numeric vector using moving window averaging.

Usage

1
runMean(input, window, overlap = FALSE, fill.NAs = TRUE, na.Rm = TRUE)

Arguments

input

A numeric vector of data to be smoothed.

window

Numeric value for the size of each "group" to be averaged.

overlap

Logical. Should the windows overlap (by half the window size)?

fill.NAs

Logical. If TRUE, only the centre point of each window is filled. Forces to TRUE if 'overlap' is TRUE.

na.Rm

Logical, to be passed to 'mean' function as 'na.rm'.

Value

A numeric vector, the same length as input.


rossholmberg/holmberg documentation built on May 27, 2019, 11:34 p.m.