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

[R-Forge #1974] Update wiki for j=lapply(.SD,...) speedup in v1.8.1. Allow .SDcols to accept unquoted names. #642

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 4 comments

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Yike Lu; Assigned to: Nobody; R-Forge link

See Dos/Don'ts number 1:

http://rwiki.sciviews.org/doku.php?id=packages:cran:data.table

Essentially, it would be nice for ans2 to be the same as ans1 without colnames(ans2)=colnames(ans1)

@jaapwalhout
Copy link

I think it would be consistent behavior if .SDcols also accepts lists as follows:

DT[, lapply(.SD, function), by = .(id, group), .SDcols = .(a, b, c)]

Related to #1257

@DavidArenburg
Copy link
Member

I agree with @jaapwalhout, never noticed this inconsistency before.

@franknarf1
Copy link
Contributor

Re .SDcols= accepting unquoted names, if the extension is general enough, maybe it could also be used in other places where cols= appear, like na.omit(x, cols = DC3:DC9) from SO: https://stackoverflow.com/q/51385594/

@MichaelChirico
Copy link
Member

MichaelChirico commented Apr 14, 2024

I think this is out-of-scope, maintainers don't want to add more NSE to .SDcols, though it could support more other features.

As to the "do's/dont's" in the OP, that link is dead, so context is lost. A new issue should help modernize the request if still relevant.

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

No branches or pull requests

5 participants