addcols: Add list of columns as NULL columns to supplied dataframe.

View source: R/utilities.R

addcolsR Documentation

Add list of columns as NULL columns to supplied dataframe.

Description

Supplied a character vector of column names, cnames, addcols will add one new, NULL column to data for each element of cnames and name it after the corresponding element of cnames.

Usage

addcols(data, cnames, type = "character")

Arguments

data

The dataframe to add the columns to.

cnames

Character vector of one or more column names to be added to data.

type

character, numeric, logical

Value

Dataframe data with added columns listed in cnames.


pepfar-datim/datapackr documentation built on April 14, 2024, 10:35 p.m.