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

cummean(x)

Arguments

x

a numeric or complex object, or an object that can be coerced to one of these.

Value

A numeric vector

Examples

cummean(1:10)
#> [1] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5