Compute the mode of a vector, i.e. the value that has highest number of occurrences. If different values have the same number of occurrences, the first one is reported.
Examples
x = c(1,1,2,3,3,3,NA)
modalValue(x = x, na.rm = TRUE)
#> [1] 3
Compute the mode of a vector, i.e. the value that has highest number of occurrences. If different values have the same number of occurrences, the first one is reported.
x = c(1,1,2,3,3,3,NA)
modalValue(x = x, na.rm = TRUE)
#> [1] 3