Input data
soo<-structure(list(Mycol1 = c(11.9, 7.8, 8.2, 14.7, 1, 21.7, 0, 48.6,
0, 2.8), Mycol2 = c(10.2, 2.7, 6.4, 55.1, 1, 8.6, 0, 0, 0, 1.9
)), row.names = c(NA, 10L), class = "data.frame")
Aim
I would like to extract the name of the column with the maximum value for each row.
Attempt
I can get the maximum value, but how do I get the name of the column that it is in.
do.call(pmin, c(soo, na.rm = TRUE))