Returns the first value with the greatest observed frequency.

mode_stat(x, na.rm = FALSE)

Arguments

x

A vector.

na.rm

Remove missing values before computing the mode.

Value

A length-one vector of the same basic type as x.

Examples

mode_stat(c(1, 1, 2, 3))
#> [1] 1