Learn R Programming

RandomWalker (version 0.1.0)

cgmean: Cumulative Geometric Mean

Description

A function to return the cumulative geometric mean of a vector.

Usage

cgmean(.x)

Value

A numeric vector

Arguments

.x

A numeric vector

Author

Steven P. Sanderson II, MPH

Details

A function to return the cumulative geometric mean of a vector. exp(cummean(log(.x)))

See Also

Other Vector Function: chmean(), ckurtosis(), cmean(), cmedian(), crange(), csd(), cskewness(), cvar(), euclidean_distance(), kurtosis_vec(), rw_range(), skewness_vec()

Examples

Run this code
x <- mtcars$mpg

cgmean(x)

Run the code above in your browser using DataLab