move vars to front
repos_front(data, ...)
data | data frame |
---|---|
... | columns to move to front |
Reordered data frame.
## data with row names d <- data.frame(x = rnorm(5), y = rnorm(5), row.names = letters[1:5]) ## move y to front repos_front(d, y)#> # A tibble: 5 x 2 #> y x #> <dbl> <dbl> #> 1 0.127 0.394 #> 2 1.74 0.124 #> 3 -0.586 0.161 #> 4 -0.445 -1.27 #> 5 -0.0869 -1.18