which.pmax function

Index of the maximum per row