Learn R Programming

statisfactory (version 1.0.4)

mmode: Calculate the mode of numeric, character, or factor data

Description

Calculate the mode of numeric, character, or factor data

Usage

mmode(x, na.rm = FALSE)

Value

Numeric, character, or factor value.

Arguments

x

Numeric, character, or factor vector.

na.rm

Logical. If TRUE then remove NAs first. Otherwise fail.

Examples

Run this code

mmode(round(10 * rnorm(1000, 2)))
mmode(c('a', 'b', 'b', 'b', 'c', 'd', 'd'))

Run the code above in your browser using DataLab