How to find the highest number of a column and print two columns of that row in R?
How do get the highest value of column2 and print column1 and column2 of that row?
Column1 Column2 test1 2 test2 9 test3 3 test5 4.5
So, how do I print the second row since column 2 has the highest value? Remember that there are more columns in the data set but I don't wanna print them all.
EDIT: Already tried getting the highest value of that column but I would like to print two columns of that row (not all columns).
subset(df1, Column2 == max(Column2))