View source: R/MODULE_2_PREP.R
gm_mean | R Documentation |
Function to calculate geometric mean of positive numbers in a vector
gm_mean(x, na.rm = TRUE)
x |
A vector of numbers (may include zero or negative numbers) |
Zeros and negative numbers will be effectively treated as 1:
They will not contribute to the product of numbers but will be included in calculation of vector length.
Compare with gm_mean_z
.
Geometric mean of the vector with the zeros and negative numbers replaced by 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.