powered by
sort a data.frame by column - basically just a wrapper for order
sortDF(df, col, decreasing = TRUE, quiet = FALSE, ...)
data.frame
Data.frame to be sorted
Column (index or (un)quoted name) to be sorted by
Logical: should highest value be on top? DEFAULT: TRUE (unlike order!)
order
Logical: suppress non-df warning? DEFAULT: FALSE
Further arguments passed to order, like eg na.last or method
na.last or method
Berry Boessenkool, berry-b@gmx.de, June 2015
sort, order, insertRows, addRows
sort
insertRows
addRows
sortDF(USArrests[USArrests$Murder>11,], Assault) sortDF(USArrests[USArrests$Murder>11,], "Assault") # safer within functions sortDF(USArrests[USArrests$Murder>11,], 3)
Run the code above in your browser using DataLab