Skip to contents

Move data frame column

Usage

df_movecolumn(x, from, to = ncol(x))

Arguments

x

data.frame.

from

String or Integer: Define which column holds the vector you want to move.

to

Integer: Define which column number you want the vector to be moved to. Default = ncol(x) i.e. the last column.

Value

data.frame

Author

EDG

Examples

if (FALSE) { # \dontrun{
mtcars_hp <- df_movecolumn(mtcars, "hp")
} # }