move: Move a column of a data.frame to another position

Description Usage Arguments Value Examples

View source: R/eps.move.R

Description

Move a column of a data.frame to another position

Usage

1
move(data, tomove, where = "last", target = NULL)

Arguments

data

data.frame to be modified

tomove

character - the column to be moved

where

character - in c("first", "last", "before", "after")

target

- character - column when where is "after" or "before"

Value

data.frame

Examples

1
2
data(gastro)
gastro <- move(gastro, "id", "after", "dayonset")

gdesve/epifield documentation built on Jan. 23, 2022, 10:03 a.m.