rt_geometric_mean | R Documentation |
Calculates the geometric mean of a vector of numbers
rt_geometric_mean(values, na.rm = TRUE, add_subtract = 1e-04)
values |
vector of numeric values |
na.rm |
if TRUE then remove NA values, if FALSE then return NA if any NA values exist |
add_subtract |
since the geometric mean takes the log of the values, a value/log of 0 will cause problems; 'add_subtract' adds the number to the values and then subtracts the value after taking the mean (but before taking the exponent) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.