Skip to content
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=function shorthand #3950

Closed
MichaelChirico opened this issue Oct 8, 2019 · 0 comments · Fixed by #3991
Closed

.SDcols=function shorthand #3950

MichaelChirico opened this issue Oct 8, 2019 · 0 comments · Fixed by #3991
Milestone

Comments

@MichaelChirico
Copy link
Member

Much like .SDcols = patterns is useful as a shorthand for filtering columns and much like setnames now accepts functions, .SDcols=function is (1) currently an error and (2) should translate pretty naturally as a shorthand for filtering in .SDcols.

e.g.

DT[ , lapply(.SD, sum), .SDcols = is.numeric]

Should be easy to apply ! as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants