Calculates the geometric mean and the geometric standard deviation of a vector x.
Usage
Gmean(x, na.rm = FALSE)
Gsd(x, na.rm = FALSE)
Arguments
x
a positive numeric vector. An object which is not a vector is coerced (if possible) by as.vector.
na.rm
logical, indicating whether NA values should be stripped before the computation proceeds. Defaults to FALSE.
Value
a numeric value.
Details
The geometric mean and sd are restricted to positive inputs (because otherwise the answer can have an imaginary component).
Use sapply to calculate the measures from data frame, resp. from a matrix.