Description Usage Arguments Value Examples
Calculate the harmonic mean of a numeric vector (will return NA if there are any negative numbers in the vector)
1 | harmonic_mean(x, na.rm = TRUE)
|
x |
numeric vector |
na.rm |
logical remove NAs prior or calculation |
harmonic mean of vector
1 2 3 | data(nancycats)
pop.sizes <- table(pop(nancycats))
harmonic_mean(pop.sizes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.