powered by
Calculates the mode (most frequent value) of a numeric vector. If there is a tie, returns all values that share the highest frequency.
MODE(x)
A numeric value (or vector) representing the mode(s) of x.
x
A numeric vector.
# Mode of a Numeric Vector MODE(c(1,2,3,3,3,4,5,5,3,8)) # Mode of the number of cylinders in mtcars dataset data("mtcars") MODE(mtcars$cyl)
Run the code above in your browser using DataLab