Find the mode (i.e., most common value) in a numeric vector. In case of ties, the first encountered value is returned.
Examples
x = c(3, 2, 5, 5, 3, 10, 2, 5)
mode_value(x)
#> [1] 5
Find the mode (i.e., most common value) in a numeric vector. In case of ties, the first encountered value is returned.
x = c(3, 2, 5, 5, 3, 10, 2, 5)
mode_value(x)
#> [1] 5