I have a table, tble from a dataframe, dfas below:
tble<-table(df$eye_color)
So it produces values as follows:
tble
Brown Black Green Blue
7 10 2 1
I want to define a variable that returns the row name with the max value in the table. For this example, it would be Black.