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

FR: in dcast, with g ~ ., don't put . in the col names #1821

Closed
franknarf1 opened this issue Aug 22, 2016 · 0 comments
Closed

FR: in dcast, with g ~ ., don't put . in the col names #1821

franknarf1 opened this issue Aug 22, 2016 · 0 comments
Assignees
Milestone

Comments

@franknarf1
Copy link
Contributor

Looking at this SO question: http://stackoverflow.com/q/30759367/

dcast(setDT(melt(trees)), variable ~ ., fun=list(sd, mean))

# No id variables; using all as measure variables
#    variable value_sd_. value_mean_.
#1:    Girth   3.138139     13.24839
#2:   Height   6.371813     76.00000
#3:   Volume  16.437846     30.17097

It would be nice to have names value_sd and value_mean without the _. at the end. Related to #1810

Maybe it would be better not to handle this piecemeal (as my two FRs have suggested), but instead with some sort of customizable regex argument name.patt = "\\meas_\\fun_\\rhs".

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

2 participants