powered by
Index of the maximum per row
which.pmax(...)
Numeric or character vectors of the same length
Vector of rankings
Determine the index of the maximum of the input vectors per row. Extension of which.max
which.max
See also which.max and which.pmin
which.pmin
# NOT RUN { which.pmax(1:10, 10:1) which.pmax(2, 10:1) which.pmax(mtcars) # }
Run the code above in your browser using DataLab