powered by
Calculate the first mode of a vector. Ignore NA values. Can be used if any mode is acceptable.
first_mode(x, empty_return = NA)
The first mode of the vector.
A vector.
The value to return if the vector is empty.
first_mode(c(1, 1, 2, 2, 3, 3, 3, NA, NA, NA))
Run the code above in your browser using DataLab