Try
col=max.col(data)
This should give you the index of the column with the max value. To get
to the final result, combine this with
names(dataframe)[col]
to get the name of the column with the maximum value.
HTH
Jannis
AuriDUL schrieb:
Hello.
I have data of potatoes production in EU
Please do provide data when submitting a question so we don't have to try to
recreate it from a brief description.
> pot <- data.frame(count=LETTERS[1:10], '1998'=runif(10), '1999'=runif(10),
+ '2000'=runif(10), '2001'=runif(10), check.names=FALSE,
stringsAsFactors=FALSE)
> pot
count
2 matches
Mail list logo