powered by
Compute the sample mode
ds_mode(data, x = NULL)
Mode of x
x
A numeric vector or data.frame.
data.frame
Column in data.
data
Any NA values are stripped from x before computation takes place. If several values are tied for the highest frequency, the smallest of them is returned.
mean median
mean
median
# vector ds_mode(mtcars$mpg) # data.frame ds_mode(mtcars, mpg)
Run the code above in your browser using DataLab