-
Notifications
You must be signed in to change notification settings - Fork 993
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
.SDcols with logical vector #4115
Comments
What is the preferred behavior for incomplete logical vectors in |
It will error. |
1.9.5 has a following new feature entry
So in theory someone could rely on that, but on the other hand, documentation does not seem to mention that . |
I would be fine putting deprecation cycle on that at least. Generally we are moving away from such recycling |
Yes, #4470 keep recycling but with warning |
In
?data.table
about.SDcols
argument:However, it seems like also a
logical
vector is possible, e.g.If selecting columns with a logical vector in
.SDcols
is intended to work, should this possibility be added to the help text?Please also note two differences with
j
in this regard:(1) Using a logical vector longer than the number of columns errors in
j
, but not in.SDcols
(2) If a logical vector with length
k < ncol(x)
is passed toj
, it will be filled to lengthncol(x)
withFALSE
. In.SDcols
, the logical vector is recycled.data.table
1.12.9 IN DEVELOPMENT built 2019-12-13 23:32:57 UTCThe text was updated successfully, but these errors were encountered: