Skip to contents

Modal value. If there is more than one unique mode, all modal values are returned.

Usage

mmode(x)

Arguments

x

Numeric or character vector.

Value

Numeric or character vector.

Examples

x <- c(1, 2, 3, 3, 4, 5, 3, 1, 2)
mmode(x)
#> [1] 3

x <- c(1, 2, 3)
mmode(x)
#> [1] 1 2 3