ecotrack <- c(22, 25, 19, 30, 24, 21, 45, 23, 20, 26, 24, 22, 18, 27, 23)
mean(ecotrack)
## [1] 24.6
median(ecotrack)
## [1] 23
# Fungsi Modus
get_mode <- function(x) {
u <- unique(x)
tab <- tabulate(match(x, u))
u[tab == max(tab)]
}
get_mode(ecotrack)
## [1] 22 24 23
quantile(ecotrack, probs = 0.25, type = 6)
## 25%
## 21
quantile(ecotrack, probs = 0.75, type = 6)
## 75%
## 26
IQR(ecotrack, type = 6)
## [1] 5
var(ecotrack)
## [1] 41.54286
sd(ecotrack)
## [1] 6.445375
library(moments)
skewness(ecotrack)
## [1] 2.212573