calc_mean | R Documentation |
Computation of the mean (arithmetic,geometric and harmonic).
calc_mean(
x,
type = c("arithmetic", "geometric", "harmonic"),
trim = NULL,
weight = NULL
)
x |
A numeric vector |
type |
A character single value |
trim |
A numeric single value, that will be the fraction of data to be trimmed from both ends |
weight |
A numeric vector, that will be the weights used for the weighted the arithmetic mean |
A numeric single value with the computed mean.
x <- rexp(100,.5)
calc_mean(x,"geometric")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.