Compute the sample mode
ds_mode(x, na.rm = FALSE)
x | a numeric vector containing the values whose mode is to be computed |
---|---|
na.rm | a logical value indicating whether NA values should be stripped before the computation proceeds. |
Mode of x
Any NA values are stripped from x
before computation
takes place.
ds_mode(mtcars$mpg)#> [1] 10.4ds_mode(mtcars$cyl)#> [1] 8