-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
efficient rename #232
Comments
|
Needs more logic to handle the grouped case, i.e handling the |
Hmm. Did not see #192. we have too many open issues about select. We should decide what it can do. The shallow_copy internal function makes it quite trivial to implement. |
Yes, select should do this. I'll try and implement a few this week (or at least figure out what select should do) |
When i get a chance (travelling now), i'll add support code internally that takes a data frame and a character vector of names and does the right shallow copy thing with them. This way on the R side w just have to calculate the wanted colimns. |
That sounds like a reasonable implementation. Can you make it take a named vector so it can simultaneously rename and select? |
Initial implementation in 8ccdb07 - I think this will make it easy to implement |
@romainfrancois to be precise, could you please write |
I've put in some initial code for a back end
Depending on what we want, the 2nd and 3rd might be the same vector. The code as it is now assumes that args 2 and 3 have the same length, that strings from 2 really are in the data frame. It handles the We could reduce 2 and 3 as a named vector if you prefer |
Done. in the select branch.
|
Thanks. Just pushed changes to use |
Closes tidyverse#232. Closes tidyverse#192. Closes tidyverse#172. Closes tidyverse#158
http://stackoverflow.com/questions/21502465/replacement-for-rename-in-dplyr
plyr::rename
makes deep copies:And we could have something more
dplyr
like:The text was updated successfully, but these errors were encountered: