cummean: Cumulative mean values

Description Usage Arguments Value Author(s) See Also Examples

View source: R/cummean.R

Description

Returns a vector whose i'th element is the cumulative mean (arithmetic mean) of the i'th first elements of the argument.

Usage

1

Arguments

x

a numeric vector.

Value

A vector of length length(x) with the cumulative mean. The i'th entry cummean(x)[i] equals mean(x[1:i]).

Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau@gmail.com>

See Also

cumsum

Examples

1
2
x <- sort(rnorm(100))
GMCM:::cummean(x)

AEBilgrau/GMCM documentation built on Nov. 9, 2021, 7:31 p.m.