delColumns: Delete columns from existing data set

Description Usage Arguments Value Examples

View source: R/delColumns.R

Description

Delete columns from existing data set

Usage

1
delColumns(dtOld, vars)

Arguments

dtOld

Name of data table that is to be updated

vars

Vector of column names (as strings)

Value

An updated data.table that contains the added simulated data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# New data set

def <- defData(varname = "x", dist = "noZeroPoisson", formula=7, id = "idnum")
def <- defData(def, varname="xUni", dist="uniformInt", formula="x-3;x+3")

dt <- genData(10, def)
dt

# Delete column

dt <- delColumns(dt, "x")
dt

kgoldfeld/simstudy documentation built on Dec. 9, 2018, 12:11 p.m.