sort.data.frame | R Documentation |
Sorts a data frame using a variable within that data frame as an index. it's basically just x[order(x[[by]])] Could be written as a method of 'sort' for data frame but need 2 figure out how to do it
## S3 method for class 'data.frame' sort(x, decreasing = FALSE, by, ...)
x |
a data frame |
decreasing |
passed to order |
by |
name of the |
... |
additional args passed to next method if they get a chance |
a sorted data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.