Add rank within group with dplyr
Add a new column rank
, which is the rank according to mpg
for each of the cars in each cyl
group.
Using min_rank within each group.
Results in
Statistics and other things
Add a new column rank
, which is the rank according to mpg
for each of the cars in each cyl
group.
Using min_rank within each group.
Results in