moveme: Moves a column in a dataframe to a specified position.

Description Usage Arguments Author(s) Examples

Description

moveme Moves a column in a dataframe to a specified position.

Usage

1
moveme(invec, movecommand)

Arguments

invec

vector of names of the dataframe of interest gathered by names(dataframe)

movecommand

character string vector containing one of four movements "before", "after", "first" or "last"

Author(s)

René Michel

Examples

1
2
# move the column to be the first column in the dataframe
data = data[moveme(names(data),'var first')]

remichel/rmTools documentation built on Dec. 11, 2021, 6:59 a.m.