powered by
Calculates the geometric mean of a vector.
geometric.mean(x, w = NULL, na.rm = FALSE)
a numeric vector.
an optional numerical vector of weights the same length as x.
x
a logical value indicating whether NA values should be stripped before the computation proceeds.
Eric Archer eric.archer@noaa.gov
x <- rlnorm(100) mean(x) median(x) geometric.mean(x)
Run the code above in your browser using DataLab