50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


vvconverter (version 0.7.0)

mode: Mode (most common value)

Description

Determine the most common value in a vector. If two values have the same frequency, the first occurring value is used.

Usage

mode(x, na.rm = FALSE)

Value

the most common value in the vector x

Arguments

x

a vector

na.rm

If TRUE: Remove nas before the calculation is done

Examples

Run this code
mode(c(0, 3, 5, 7, 5, 3, 2))

Run the code above in your browser using DataLab