running_mean {diagis}R Documentation

Running mean

Description

Computes running mean of a vector or matrix, returning the values from each step.

Usage

running_mean(x, na.rm)

Arguments

x

A numeric vector, matrix, three dimensional array, or an mcmc object from the coda package. For matrix, the mean is computed for each column, and for array the sweep is done over the third dimension.

na.rm

If TRUE, NA values in x are omitted from the computation. Default is FALSE.

Value

A vector containing the recursive mean estimates.


[Package diagis version 0.2.3 Index]