Learn R Programming

TidyDensity (version 1.5.0)

chmean: Cumulative Harmonic Mean

Description

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

Usage

chmean(.x)

Value

A numeric vector

Arguments

.x

A numeric vector

Author

Steven P. Sanderson II, MPH

Details

A function to return the cumulative harmonic mean of a vector. 1 / (cumsum(1 / .x))

See Also

Other Vector Function: bootstrap_p_vec(), bootstrap_q_vec(), cgmean(), ckurtosis(), cmean(), cmedian(), csd(), cskewness(), cvar(), tidy_kurtosis_vec(), tidy_scale_zero_one_vec(), tidy_skewness_vec()

Examples

Run this code
x <- mtcars$mpg

chmean(x)

Run the code above in your browser using DataLab