You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.SD is not accessible in .SDcols. This would mean that there are two definitions of .SD around (one pre- and one post-.SDcols-selection), but imho the difference is rather intuitive.
The resulting logical vector doesn't work.
.2. As a second step it would be really cool if .SDcols would accept selection functions, kind of like Filter:
Other possible use cases apart from type-checks would be basic thresholds and the like.
.3. I smuggled a third wish into the last example. .SDcols already looks like one of the comfort-variables, it would be really nice if we could use it to access the available columns. :)
Thanks for having a look at it even if it doesn't get implemented
Ciao,
Stefan
The text was updated successfully, but these errors were encountered:
Please file 1 issue per FR/bug, even if they are related. It helps close the issues as and when they are implemented / discussed.
I'll consider point (1) alone for this issue, and will implement .SDcols taking logical argument. Could you please re-file the other issues when you find time? Thanks.
The use of colnames(.SD) in the LHS would be a completely different FR (and I think one already exists) as well.
I'd consider the colnames(.SD) issue part of #795 as mentioned in the report.
I'll have to think about the functions-as-.SDcols-value thing a bit. I put it in here as an aside because it could be implemented as a quick hack the way you did the logicals (if(is.function) ...) but before I make it its own issue I'd like to find a more flexible and less hacky way; even if it's just a feature request / conversation starter. :)
Hi,
these are two connected feature requests for .SDcols:
.1. First, allow logical specifications of columns which would allow stuff like this:
Note that this fails currently because
colnames(.SD)
in the := specification doesn't work as I mentioned in issue names(.SD) := ... should work #795.2. As a second step it would be really cool if .SDcols would accept selection functions, kind of like Filter:
Other possible use cases apart from type-checks would be basic thresholds and the like.
.3. I smuggled a third wish into the last example. .SDcols already looks like one of the comfort-variables, it would be really nice if we could use it to access the available columns. :)
Thanks for having a look at it even if it doesn't get implemented
Ciao,
Stefan
The text was updated successfully, but these errors were encountered: