Submitted by: Eduard Antonyan; Assigned to: Arun ; [R-Forge link](https://r-forge.r-project.org/tracker/index.php?func=detail&aid=5357&group_id=240&atid=978) I frequently remove many columns by doing the following: ``` S d = data.table(a = 1:5, b1 = 1:5, b2 = 1:5) d[, grep("b", names(d)) := NULL] ``` Unfortunately the above dies when the search fails and the LHS is actually empty (`integer(0)` or `character(0)`): ``` S d[, grep("c", names(d)) := NULL] # Error in `[.data.table`(d, , `:=`(grep("c", names(d)), NULL)) : # Logical error in assign, no column positions passed to assign ``` I'd much rather this resulted in no action + a warning.