Hi
Here's my dataframe:
data.frame(
stringsAsFactors = FALSE,
check.names = FALSE,
Sampleid = c("AVM_360", "AVM_360", "AVM_360"),
Currentid = c("Bibasis vasutana",
"Bibasis vasutana","Bibasis vasutana"),
%Match = c(100, 100, 99.5),
Matchid = c("Bibasis vasutana", "Burara vasutana", "Bibasis nikos")
)
I want to select the highest values according to "%Match". As you can see, there are two values both with 100.0 match but the "Matchid" is different. How should I write such a code that filters out the highest value of each group (Sampleid), and if there are multiple highest value with the same number, filter all those?