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

Explanations on differences/complementarities with magrittr and purrr #119

Open
briatte opened this issue Jan 5, 2017 · 1 comment
Open

Comments

@briatte
Copy link

briatte commented Jan 5, 2017

Both your rlist and pipeR packages look ultra-interesting, but I am failing to understand exactly how different they are from other packages, namely magrittr and purrr.

I do not understand, for instance, how pipeR::%>>% differs from magrittr:%>%.

Similarly, I would appreciate a comparison of how list operations differs in purrr and rlist, as well as a discussion of how well both packages might work together, if they accomplish different things.

Last, and this is purely cosmetic, but how about making aliases with underscores in function names, e.g. list_filter, in order to have your package blend nicely with packages in which underscores are used to separate the package prefix from the verb (e.g. stringr)?

Thanks in advance for your time, and again, congratulations for writing up these interesting packages.

@matthewcrews
Copy link

The major difference between the pipeR::%>>% and magrittr::%>% is that the pipeR function is more straightforward to reason about than the magrittr function. I exclusively use the pipeR function for this reason. magrittr has a lot of logic to figure out where to pipe the argument into the function. pipeR's logic is straightforward, if there are no containing brackets it will pipe the value into the first argument. If there are brackets, it will pipe the value into the . symbol. This also makes the pipeR implementation faster. This does not matter much if you are only calling the %>% function a couple of times but in hot loops it can make a significant difference.

Here is a link to where Kun Ren explains this in detail: https://renkun.me/blog/2014/08/08/difference-between-magrittr-and-pipeR.html

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

No branches or pull requests

2 participants