# Load German credit data
data(germancredit)
# variable filter
dt_sel = var_filter(germancredit, y = "creditability")
dim(dt_sel)
# return the reason of varaible removed
dt_sel2 = var_filter(germancredit, y = "creditability", var_rm_reason = TRUE)
lapply(dt_sel2, dim)
str(dt_sel2$dt)
str(dt_sel2$rm)
# keep columns manually, such as rowid
germancredit$rowid = row.names(germancredit)
dt_sel3 = var_filter(germancredit, y = "creditability", var_kp = 'rowid')
# remove columns manually
dt_sel4 = var_filter(germancredit, y = "creditability", var_rm = 'rowid')
Run the code above in your browser using DataLab