R/mode_factor.R

Defines functions mode_factor

Documented in mode_factor

mode_factor <- function(x) {
  ux <- unique(x)
  tabu <- tabulate(match(x, ux))
  as.character( ux[which(tabu==max(tabu))] )
}

Try the regclass package in your browser

Any scripts or data that you put into this service are public.

regclass documentation built on March 26, 2020, 8:02 p.m.