R/Mode.R

#' Compute mode
#' @param x a list of numbers
#' @export


  Mode <- function(x) {
    ux <- unique(x)
    ux[which.max(tabulate(match(x, ux)))]
  }
tianwei-zhang/tianweiR documentation built on May 21, 2019, 3:03 a.m.