the.mode {sur}R Documentation

Mode

Description

Function to obtain the mode(s) of a distribution.

Usage

the.mode(x)

Arguments

x

object containing data for a single variable.

Value

A numeric vector of the value(s) of the distribution that have the highest frequency of occurrence.

See Also

mean, median

Examples

# 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)

[Package sur version 1.0.4 Index]