Sort the rows of a data.frame according to one or more columns.
sortByCol(x, col, asc = TRUE)
x
[data.frame] Data.frame to sort.
data.frame
col
[character] One or more column names to sort x by. In order of preference.
character
asc
[logical] Sort ascending (or descending)? One value per entry of col. If a scalar logical is passed, it is replicated. Default is TRUE.
logical
TRUE
[data.frame].