researchdatapod.com
How to Find the Column Name with the Largest Value for Each Row using R
You can find the column name with the largest value across all rows using the colnames() function together with the apply function. For example, df$largest_col