Return location of minimum, maximum and mode values' positionSource:
These function return the position (index) of all the minimum, maximum, and mode values of the vector
which_max() only support numeric and logical vectors.
These functions are identical to
which.max(), except that ALL minima/maxima are returned instead of only the first one.
which_min(x, first_only = FALSE) which_max(x, first_only = FALSE) which_mode(x, first_only = FALSE)
A numeric or vector
Logical value indicating whether only the first value should be returned (i.e. if
TRUEthe function behaves like
which.max()). Default is FALSE.