Compute the sample mode

ds_mode(data, x = NULL)

Arguments

data

A numeric vector or data.frame.

x

Column in data.

Value

Mode of x

Details

Any NA values are stripped from x before computation takes place.

See also

Examples

# vector ds_mode(mtcars$mpg)
#> [1] 10.4
# data.frame ds_mode(mtcars, mpg)
#> [1] 10.4