View source: R/run_single_point_base.R
| trimmed_geom_mean | R Documentation |
Computes the trimmed geometric mean of a numeric vector
trimmed_geom_mean(x, trim = 0, na.rm = TRUE)
x |
A numeric vector containing the values for geometric mean calculation. |
trim |
A numeric value between 0 and 0.5 indicating the proportion of values to be trimmed from each end of the vector. Default is 0. |
na.rm |
Logical value indicating whether missing values should be removed before computation. Default is TRUE. |
A numeric value representing the trimmed geometric mean. Returns NA if no values remain after trimming.
x <- c(1, 2, 3, 4, 5, 100)
trimmed_geom_mean(x, trim = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.