Skip to content
New issue

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

Automatic indexing and ! operator #932

Closed
arunsrinivasan opened this issue Nov 2, 2014 · 0 comments
Closed

Automatic indexing and ! operator #932

arunsrinivasan opened this issue Nov 2, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@arunsrinivasan
Copy link
Member

Thanks to Matthieu for the email.

require(data.table)
DT <- data.table(v1 = c(1,NA,2), v2 = c(1,NA,2))

DT[!(v1==1)]
#    v1 v2
#1:  2  2
DT[!v1==1] ## different result due to auto indexing
#    v1 v2
#1: NA NA
#2:  2  2
options(datatable.auto.index=FALSE)
DT[!v1==1] ## turning off restores default functionality
#    v1 v2
#1:  2  2
@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone Nov 16, 2014
@arunsrinivasan arunsrinivasan modified the milestones: v1.9.6, v1.9.8 Feb 7, 2015
@arunsrinivasan arunsrinivasan self-assigned this Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant