Skip to contents

Move data frame column

Usage

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

Arguments

x

data.frame.

colname

Character: Name of column you want to move.

to

Integer: Which column position to move the vector to. Default = ncol(x) i.e. the last column.

Value

data.frame

Author

EDG

Examples

if (FALSE) { # \dontrun{
ir <- df_movecolumn(iris, colname = "Species", to = 1L)
} # }