View source: R/miscellaneous.R
reorderColumns | R Documentation |
Function for reordering columns
reorderColumns(data, vars)
data |
A |
vars |
Named vector indicating the position in the data frame of the specified variable |
The same data.frame
specified in data
,
with ordered columns.
someData <- data.frame(
"Col1" = c(1, 2),
"Col2" = c(2, 3),
"Col3" = c(3, 4)
)
reorderColumns(
data = someData,
vars = c("Col3" = 1)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.