R/modus.R

# Modus function
modus <- function(x) {
  uniqx <- unique(x)
  uniqx[which.max(tabulate(match(x, uniqx)))]
}
alfell/feller documentation built on May 4, 2019, 4:14 a.m.