Reputation:
Say I have the dataframe df.df and I want to find the highest value.
Molly 290
Susan 189
Zoe 276
...
if I use
max(df.df)
it'll give me
[1] Zoe
But I want to extract "290". What command would I use to do so? Thanks!
Upvotes: 0
Views: 1311
Reputation: 628
df <- read.table( text = "Molly 290
Susan 189
Zoe 276")
max(df[2]) #Column 2
Upvotes: 1