moveColumnsToFront | R Documentation |
Move columns of a data frame or matrix to the left
moveColumnsToFront(x, columns = NULL)
x |
data frame |
columns |
vector of column names |
data frame or matrix with columns
being the leftmost columns
x <- data.frame(a = 1:5, b = 2:6, c = 3:7)
moveColumnsToFront(x, "b")
moveColumnsToFront(x, c("b", "a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.