Last chance! 50% off unlimited learning
Sale ends in
Hmean(x, na.rm = FALSE)
sapply
to calculate the measures from data frame, resp. from a matrix.Gmean
x <- runif(5)
Hmean(x)
m <- matrix(runif(50), nrow = 10)
apply(m, 2, Hmean)
sapply(as.data.frame(m), Hmean)
Run the code above in your browser using DataLab