How to get top or bottom values by each group in R

It is easy to return top or bottom values by a group with functions slice_min and slice_max from dplyr in R. If you can’t find those functions, then you have to update dplyr. You might take a look at slice because there is a lot of things that you can do with these or other … Continue reading How to get top or bottom values by each group in R