delColumns {simstudy} | R Documentation |
Delete columns from existing data set
Description
Delete columns from existing data set
Usage
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 without vars
.
Examples
# 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
[Package simstudy version 0.8.1 Index]