
Function to obtain the mode(s) of a distribution.
the.mode(x)
object containing data for a single variable.
A numeric vector of the value(s) of the distribution that have the highest frequency of occurrence.
# NOT RUN {
# single mode for factor variable
the.mode(NELS$urban)
# bimodal numeric variable
a = c(14,24,62,12,12,12,36,17,11,99,99,99)
the.mode(a)
# }
Run the code above in your browser using DataLab