Download this file
1 2 3 4 5 6 7
which.is.max <- function (x) { y <- seq(length(x))[x == max(x)] if (length(y) > 1) y <- sample(y, 1) y }