| reorder_columns | R Documentation |
Reorders columns according to a prefered target order
reorder_columns(x, target, decreasing = FALSE)
x |
an object with columns, such as a |
target |
a character or named numeric vector that specifies the column prefered order.
If a numeric vector, then its names are assumed to correspond to columns,
and its values determine the target order – according to argument |
decreasing |
logical that indicates in which direction a numeric target vector should be ordered. |
Column names will be reordered so that their order match the one in target.
Any column that does not appear in target will be put after those that are
listed in target.
an object of the same type and dimension
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.