Learn R Programming

PMmisc (version 0.1.2)

df.sortcol: 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

Run this code
# NOT RUN {
df.sortcol(mtcars,2,desc = TRUE)
# }

Run the code above in your browser using DataLab