Gmean(x, na.rm = FALSE)
Gsd(x, na.rm = FALSE)
sapply
to calculate the measures from data frame, resp. from a matrix.mean
, Hmean
x <- runif(5)
Gmean(x)
m <- matrix(runif(50), nrow = 10)
apply(m, 2, Gmean)
sapply(as.data.frame(m), Gmean)
Run the code above in your browser using DataLab