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