which.max Determines the location, i.e., index of the (first) minimum or maximum of a numeric vector. If the vector has multiple max, how can I retrieve all of them?
which.max
You could do which( myVector == max(myVector) ), which is basically what which.max is (except that which.max stops at the first occurence and is implemented a bit more efficiently).
which( myVector == max(myVector) )
2.1m questions
2.1m answers
60 comments
57.0k users