Description Usage Arguments Details Value Author(s) Examples
View source: R/ColumnReorder.r
Moves column names to the front or back of the names
1 2 3 | colsToFront(data, cols = names(data))
colsToBack(data, cols = names(data))
|
data |
data.frame or tbl |
cols |
Columns that should be moved |
Moves column names to the front or back of the names
Character vector of column names
Jared P. Lander
1 2 3 4 5 6 7 | theDF <- data.frame(A=1:10, B=11:20, C=1:10, D=11:20)
colsToFront(theDF, c('B', 'C'))
colsToFront(theDF, c('C', 'B'))
colsToFront(theDF, c('C', 'C'))
colsToBack(theDF, c('C', 'C'))
colsToBack(theDF, c('C', 'B'))
colsToBack(theDF, c('C', 'C'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.