R/stat_mode.R

Defines functions stat_mode

Documented in stat_mode

#' Auxiliary Internal Functions
#' 
#' @rdname n_elecfuns
#' @param x Numeric vector
#'
#' @return Statistical mode
#'
stat_mode <- function(x) {
  unique(x)[which.max(table(x))]
}

Try the i3pack package in your browser

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

i3pack documentation built on June 8, 2025, 11:43 a.m.