drop_colr present since hutils 1.0.0.

drop_grep is identical but only present since hutils 1.2.0.

drop_colr(DT, pattern, ..., checkDT = TRUE)

Arguments

DT

A data.table.

pattern

A regular expression as in grepl.

...

Arguments passed to grepl.

checkDT

If TRUE (the default), will error if DT is not a data.table.

Examples

library(data.table) dt <- data.table(x1 = 1, x2 = 2, y = 3) drop_grep(dt, "x")
#> y #> 1: 3