Determine the most common value in a vector. If two values have the same frequency, the first occurring value is used.
mode(x, na.rm = FALSE)
a vector
If TRUE: Remove nas before the calculation is done
the most common value in the vector x
mode(c(0, 3, 5, 7, 5, 3, 2))
#> [1] 3