mod: Mode

Description Usage Arguments Value Examples

View source: R/operators.R

Description

find the most frequently occurring value in a vector. If the vector contains more than a single mode, then the first one to encounter is returned.

Usage

1
mod(x)

Arguments

x

vector, not limited to numerical.

Value

the mode

Examples

1
2
3
table(mtcars$cyl)
mod(mtcars$cyl)
mod(c("John", "Kevin", "Terry", "John", "Sven"))

ShaulAb/typeless documentation built on May 28, 2019, 3:15 p.m.