R/findmode.R

#' Find the modal value/category in a vector
#'
#' @param x A vector of values.
#' @export
#'
#'

findmode = function (x){
  mode = names(rev(sort (table (x)))[1])
  mode
}
santiagobarreda/bmmb documentation built on June 11, 2024, 5:33 p.m.