We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitted by: Eduard Antonyan; Assigned to: Arun ; R-Forge link
I frequently remove many columns by doing the following:
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)):
integer(0)
character(0)
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.
The text was updated successfully, but these errors were encountered:
arunsrinivasan
No branches or pull requests
Submitted by: Eduard Antonyan; Assigned to: Arun ; R-Forge link
I frequently remove many columns by doing the following:
Unfortunately the above dies when the search fails and the LHS is actually empty (
integer(0)
orcharacter(0)
):I'd much rather this resulted in no action + a warning.
The text was updated successfully, but these errors were encountered: