sortDF | R Documentation |
sort a data.frame by column - basically just a wrapper for order
sortDF(df, col, decreasing = TRUE, quiet = FALSE, ...)
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 |
data.frame
Berry Boessenkool, berry-b@gmx.de, June 2015
sort
, order
,
insertRows
, addRows
sortDF(USArrests[USArrests$Murder>11,], Assault)
sortDF(USArrests[USArrests$Murder>11,], "Assault") # safer within functions
sortDF(USArrests[USArrests$Murder>11,], 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.