Learn R Programming

descriptr (version 0.5.2)

ds_mode: Mode

Description

Compute the sample mode

Usage

ds_mode(x, na.rm = FALSE)

Arguments

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.

Value

Mode of x

Details

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

See Also

mean median

Examples

Run this code
# NOT RUN {
ds_mode(mtcars$mpg)
ds_mode(mtcars$cyl)
# }

Run the code above in your browser using DataLab