-
Notifications
You must be signed in to change notification settings - Fork 986
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
[.data.table which
argument could accept integer
#3736
Comments
But can't you first check the value of |
I don't understand the use case. For the benchmarks in #3735 I see a large improvement with If NSE overhead is too high, maybe let the user explicitly indicate how they expect
The explicitly named functions might also help with folks learning DT[...] and having trouble with the NSE behind the terse syntax and/or not realizing that the multiple uses of I suggested a helper |
Currently when users write "with = FALSE", they're able to select columns named in variable, making the data.table behave similar to a data.frame. |
Expression passed to |
@chnynf note this issue is about |
this request could be superseded by #4485 |
Currently
which
is guaranteed to be logical length 1.If we will accept integer to be supplied to
which
argument (ANDmissing(i)
) we could easily invert its functionality to subset data.table by integer row index. That would efficiently address #3735, see benchmark there (12.7s vs 3.5s).Example usage
I am aware it is better to optimise
i=2:3
but because of NSE processing it is very tricky to optimise that, and probably will never be as fast as non-NSEwhich
argument.The text was updated successfully, but these errors were encountered: