sort.data.frame | R Documentation |
Re-orders data frame rows so that a column is sorted.
## S3 method for class 'data.frame' sort(x, decreasing = FALSE, f = ncol(x), ...)
x |
a data frame |
f |
the name or number of a column of |
A reordered version of x
where the values in column f
are in
ascending order.
Tom Minka
sort_cells
data(mtcars) sort(mtcars, f = "mpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.