This function locates the minimum value in a vector (similar to which.min), however it will randomly break ties when there are multiple minimum values.
Usage
which.random.min(x, favour_first = F)
Arguments
x
numeric vector.
favour_first
logical. If this is TRUE, and the first value in the vector supplies is one of the min, the index for the first value will always be returned.