How to rank rows by two columns at once in R?
order
works, but for manipulating data frames, also check out the plyr
and dplyr
packages.
> arranged_x <- arrange(x, v2, v1)
order
works, but for manipulating data frames, also check out the plyr
and dplyr
packages.
> arranged_x <- arrange(x, v2, v1)