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

:= should drop secondary key #885

Closed
mattdowle opened this issue Oct 13, 2014 · 1 comment
Closed

:= should drop secondary key #885

mattdowle opened this issue Oct 13, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@mattdowle
Copy link
Member

As raised here:
http://stackoverflow.com/questions/26308072/operator-inconsistent-in-logical-columns-in-data-table/26308820

@mattdowle mattdowle added the bug label Oct 13, 2014
@mattdowle mattdowle added this to the v1.9.6 milestone Oct 13, 2014
@arunsrinivasan
Copy link
Member

I'm guessing that includes set() as well.

Also the same happens with setorder(). setkey() seems to handle it properly though.

Here's an example:

set.seed(45L)
require(data.table)
dt = data.table(x=sample(3,20, TRUE), y=sample(4,20,TRUE))
dt[x==1L] ## 9 rows
dt[x==2L]
attributes(dt)
setorder(dt, -y)
attributes(dt)
dt[x==1L] ## 1 row

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

2 participants