cummean: Cumulative Arithmetic Mean

Description Usage Arguments Value Author(s) References See Also Examples

Description

Returns a vector whose elements are the cumulative arithmetic mean of the elements of the argument.

Usage

1

Arguments

x

a numeric vector.

Value

A numeric vector of the same length as x. An NA value in x causes the corresponding and following elements of the return value to be NA.

Author(s)

Arturo Erdely and Ian Castillo.

References

Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.

See Also

cumhmean, cumgmean, cummedian

Examples

1
cummean(c(9, 1, 4, 0, 3, NA, 8, 5))

Example output

[1] 9.000000 5.000000 4.666667 3.500000 3.400000       NA       NA       NA

cumstats documentation built on May 2, 2019, 3:04 a.m.