powered by
harmonic.mean(x,na.rm=TRUE)
x <- seq(1,5) x2 <- x^2 x2[2] <- NA X <- data.frame(x,x2) harmonic.mean(x) harmonic.mean(x2) harmonic.mean(X) harmonic.mean(X,FALSE)
Run the code above in your browser using DataLab