Is there an R function to use with top_n when scores are equal
I'm doing correlations on school leaving scores and University scores. I use top_n to clean the school scores of retakes, but sometimes the poor candidate gets the same score on retake. How to eliminate these duplicates ?
Studno Math
1 2105234 53
2 2126745 10
3 2126745 10
4 2110897 41
5 2344567 55
6 2213467 63
7 2314521 67
8 2314521 40
9 2123456 18
10 2123456 45
duppymat1 %>% group_by ("Studno") %>% top_n(1,"Math")
This eliminates the two duplicates where scores are different, but how to code to eliminate one of the two that are equal ?