Description Usage Arguments Details Value Note Examples
Move specific columns in data.frames to be the first or last columns.
1 2 3 4 5 6 7 |
df |
A data.frame. |
... |
Comma separated list of unquoted expressions. Used in NSE functions. |
cols |
A vector of column names to move. Used in SE functions. |
moveFront
moves columns to be the first columns in a data.frame,
moveBack
moves columns to be the last columns in a data.frame.
The order of the columns as passed in the arguments will be the
same order that the columns will appear in the resulting data.frame,
regardless if the front or back functions are called.
moveFront
and moveBack
are the non-standard evaluation (NSE)
versions, while moveFront_
and moveBack_
are the standard
evaluation (SE) versions. Look at the examples to see the difference in
usage.
A data.frame with the given columns moved either to the beginning or end of the data.frame.
The dplyr
package is required for these functions.
If any of the column names given are not valid columns, an error is raised.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.