Find the mode in a vector x

modemfv(x, na.rm = TRUE)

Arguments

x

a vector

na.rm

logical to indicate if NA should be removed (defaults to TRUE)

Value

object of length 1, the same type as x

Examples

modemfv(ggplot2::diamonds$carat)
#> [1] 0.3