I need to find the row-wise minimum in an array where each minimum must stem from a unique column. For example, a is a dataframe/matrix
| X1 | X2|X3|
| 4 | 5 | 6|
| 1 | 2 | 3|
| 7 | 8 | 9|
When i use rowMin, the output is 4,1,7. However, what I need an output of is unique minimum of each row vs column. Therefore the output needs to be 5,1,9 I know there are solutions in python, Im unable to do this in R!