Learn R Programming

descriptr (version 0.1.0)

stat_mode: Mode

Description

Compute the sample mode

Usage

stat_mode(x)

Arguments

x

a numeric vector containing the values whose mode is to be computed

Value

Mode of x

Details

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

See Also

mean median

Examples

Run this code
stat_mode(mtcars$mpg)
stat_mode(mtcars$cyl)

Run the code above in your browser using DataLab