-
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
Port plyr::mapvalues() equivalent into dplyr #5919
Comments
We are in the process of designing a better |
I'm confused, do we have an equivalent to plyr::mapvalues() in dplyr or in any other tidyverse package? |
The new |
Is |
Probably referring to |
Could you include as an example the equivalent to:
which is what is really needed by users? |
ref. #4310
(cannot write into that issue because it was blocked).
The currently suggested alternatives for plyr::mapvalues() in dplyr are inconvenient.
In the case of
the solution is unbearable as soon as the "from" and "to" vectors are longer than 3 elements.
In the case of
the code is just inextricable.
It would be so much friendlier just having a function dplyr::mapvalues()
as a wrapper for the last solution, i.e. as suggested in
https://stackoverflow.com/questions/62216940/dplyr-alternative-for-plyrmapvalues-recode-using-dictionary
While implementing that solution as a personal function is easy, using personal functions for
such a general tool is not a good idea, as R scripts would easily become unintelligible to other people.
The text was updated successfully, but these errors were encountered: