moveme | R Documentation |
Move columns
moveme(invec, movecommand)
invec |
A matrix of values with at least two dimensions e.g. data frame, attributes of a shapefile |
movecommand |
character. Instructions to move the column, four options:first, last, before and after. e.g. |
The solution was proposed by the user "A5C1D2H2I1M1N2O1R2T1" https://stackoverflow.com/users/1270695/a5c1d2h2i1m1n2o1r2t1.
## Not run: moveme(names(df), "g first")
moveme(names(df), "g first; a last; e before c")
df[moveme(names(df), "g first")]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.