powered by
sort a data.frame by column - basically just a wrapper for order
sortDF(df, col, decreasing = TRUE, quiet = FALSE, ...)
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
data.frame
sort, order, insertRows, addRows
sort
insertRows
addRows
# NOT RUN { 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