-
Notifications
You must be signed in to change notification settings - Fork 977
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
Deprecating with
argument makes expr column selector less obvious
#2826
Comments
Personally I would prefer keep "[.data.table" = function (x, i, j, with=inspectj(j), ...) ...
# or
"[.data.table" = function (x, i, j, with=NA, ...) {...; if (is.na(with)) auto_detect else force_behavior; ...}
# where auto_detect has logic like `inspectj` but does not have to be separate function Then user can always force |
On first glance, there seems to be two bugs.
That should work as if This already works :
But this doesn't :
I remember some special casing for Let's try that first anyway, demo the new fixed behaviour, and then see if you're ok with it. |
with
argument makes expr column selector less obvious
|
Glad to see
1.11.0
version is just released. I noticed fromNEWS
thatwith=
will be slowly deprecated in future versions (as thoroughly discussed in #2655). However, I find it less obvious for the following cases:To use
selector$x
orselector$y
to select columns indt
,with
argument is more obvious.But if
with=
is no longer available, it seems that we can only storeselector$x
in another symbol that allows direct access to do the same.Another similar case is calling a function to get the column names we need:
I'm not sure if I'm missing something new in the latest release but these cases can be ugly without
with
argument. If..
has to be applied to these cases, it seems that all..symbol
is needed to be directed tosymbol
in the calling scope (#2589) so that something likedt[, ..selector$x]
ordt[, ..f("x")]
work.The text was updated successfully, but these errors were encountered: