sortDF {berryFunctions} | R Documentation |
sort dataframes by column
Description
sort a data.frame by column - basically just a wrapper for order
Usage
sortDF(df, col, decreasing = TRUE, quiet = FALSE, ...)
Arguments
df |
Data.frame to be sorted |
col |
Column (index or (un)quoted name) to be sorted by |
decreasing |
Logical: should highest value be on top?
DEFAULT: TRUE (unlike |
quiet |
Logical: suppress non-df warning? DEFAULT: FALSE |
... |
Further arguments passed to |
Value
data.frame
Author(s)
Berry Boessenkool, berry-b@gmx.de, June 2015
See Also
sort
, order
,
insertRows
, addRows
Examples
sortDF(USArrests[USArrests$Murder>11,], Assault)
sortDF(USArrests[USArrests$Murder>11,], "Assault") # safer within functions
sortDF(USArrests[USArrests$Murder>11,], 3)
[Package berryFunctions version 1.22.5 Index]