| sortby | R Documentation |
Shortcuts for sorting data frames
sortby(df, key, decreasing = F, absolute = F)
rsortby(df, key, absolute = F)
rsortabs(df, key)
sortabs(df, key, decreasing = F)
df |
a data frame |
key |
column for sorting the data frame |
abs |
whether sort should be by absolute numeric values |
sortby sorts a data frame by column key. If
absolute is TRUE, then the numeric values in column key will
be first turned to absolute values with abs().
rsortby is the same as sortby(..., decreasing=T).
sortabs and rsortabs are the same as sortby and
rsortby with parameter abs=TRUE.
All functions return a sorted data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.