Skip to contents

Insert columns into a data.frame at a specific position. Transforms tibble or data.table to data.frame.

Usage

insert.col(dat, toinsert, after)

Arguments

dat

A data frame

toinsert

Column name(s) or column number(s) of the columns to be reinserted

after

Column name or column number after which the columns specified in insert should be reinserted.

Value

A data frame with columns in specified positions.