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
set
NA
library(data.table) ## v1.9.5+ data = data.frame(cats = rep(c('', ' ', 'meow'), 5)) set(data, i = grep("^$|^ $", data[[1]]), j = 1L, value = NA_integer_) # Warning message: # In set(data, i = grep("^$|^ $", data[[j]]), j = 1L, value = NA_integer_) : # RHS contains -2147483648 which is outside the levels range ([1,3]) of column 1, NAs generated
While base R handles it correctly
data = data.frame(cats = rep(c('', ' ', 'meow'), 5)) indx <- grep("^$|^ $", data$cats) data$cats[indx] <- NA_integer_
Related to this SO answer
The text was updated successfully, but these errors were encountered:
fb1b542
arunsrinivasan
No branches or pull requests
While base R handles it correctly
Related to this SO answer
The text was updated successfully, but these errors were encountered: