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.

Exit mobile version