df.sortcol {YRmisc} | R Documentation |
Sort a data frame by a column of choice. The column of choice is specified by the number of the column.
df.sortcol(x,n,desc)
x |
:a data frame |
n |
:number column to sort |
desc |
:the order of sorting, default set to TRUE; for ascending order set to FALSE |
df.sortcol(mtcars,2,desc = TRUE)