moveme: Move columns

movemeR Documentation

Move columns

Description

Move columns

Usage

moveme(invec, movecommand)

Arguments

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.

References

The solution was proposed by the user "A5C1D2H2I1M1N2O1R2T1" https://stackoverflow.com/users/1270695/a5c1d2h2i1m1n2o1r2t1.

Examples

## 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)

OscarGOGO/Makurhini documentation built on Jan. 9, 2025, 1:20 p.m.