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 June 8, 2025, 12:40 p.m.