-
Notifications
You must be signed in to change notification settings - Fork 990
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
Feature Request: pass column to key #1474
Comments
Any proposal how to handle following key definition? library(data.table)
k = "b"
dt = data.table(b = "a", k = "b", key = k) Just put your expected results. |
@jangorecki this is in relation to a SO question about consistency as it seems some The relevant code of
This snippet comes after the assignment of the columns; seems reasonable for there to be a way to switch There is where things get dicey, though, because leaving Another alternative would be to interpret |
This is a basic feature of R and not specific to data.table:
Yeah, I was thinking along those lines too. One problem with that is that it is inconsistent with how On the other hand |
@franknarf1 Good point about |
Closing this as won't fix. It doesn't seems to bring anythin more useful than 2 quote character less to type, and it introduces the complexity of catching |
I can define the data.table with either id = 1:10 or "id" = 1:10, but I must define the key with key = "id" as key = id does not work:
The text was updated successfully, but these errors were encountered: