which.pmin function

Index of the minimum per row