How to compute the harmonic mean in the R programming language. More details: https://statisticsglobe.com/harmonic-...
R code of this video:
x <- c(10, 14, 29, 30, 41, 53, 27, 55) # Create example vector
x # Print example vector
install.packages("psych") # Install psych package
library("psych") # Load psych package
harmonic.mean(x) # Apply harmonic.mean function
data(iris) # Load iris data
head(iris) # First rows of iris data
harmonic.mean(iris$Sepal.Length) # Apply harmonic.mean to column
Follow me on Social Media:
Facebook – Statistics Globe Page: / statisticsglobecom
Facebook – Group for Discussions & Questions: / statisticsglobe
LinkedIn – Statistics Globe Page: / statisticsglobe
LinkedIn – Group for Discussions & Questions: / 12555223
Twitter: / joachimschork
Music by bensound.com