removeVariables {CALIBERdatamanage} | R Documentation |
Deletes one or more columns and also deletes their description. If the cohort object is a data.table, it is updated by reference, if a flat file data frame the modified object is returned.
removeVariables(x, colnames) removeColumns(x, colnames)
x |
a |
colnames |
a character vector of the column names to delete |
Returns the modified ffdf or data.table, invisibly.
Anoop Shah
cohort
, subset.cohort
, modifyDescription
COHORT <- cohort(data.table(anonpatid = 1:3, indexdate = as.IDate(c("2012-1-3", "2012-1-2", "2010-1-9")), sex = c("M", "F", "M"))) removeColumns(COHORT, c('indexdate', 'sex')) print(COHORT)