getmode: Get the mode of a vector or variable

View source: R/utility.R

getmodeR Documentation

Get the mode of a vector or variable

Description

The mode is the number that appears the most often in a vector or variable. This measure is especially important for nominal variables since the mean or median cannot meaningfully be reported.

Usage

getmode(v)

Arguments

v

a vector of variable in dataframe

Value

Returns the mode of v, i.e., the value occurring most often

Examples


vec <- c("A", "A", "B")
getmode(vec)


rextor documentation built on May 21, 2026, 5:09 p.m.