orderBy | R Documentation |
Order a Data Frame by One or more Columns
orderBy(df, by = NULL, ...)
df |
data frame |
by |
vector of column names specifying the columns by which to order |
... |
further arguments passed to |
df
being sorted and with newly renumbered rows
orderBy(iris, by = "Sepal.Length")
orderBy(iris, by = "Species", decreasing = TRUE)
orderBy(
iris,
by = c("Species", "Petal.Width", "Petal.Length"),
decreasing = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.