R, dplyr – combination of group_by() and arrange() does not produce expected result? May 1, 2023 by Tarik