You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that if the placeholder is only used in a nested function call, the lhs is also placed as the first argument, and we can override this by wrapping the rhs in braces. However, I'm wondering if there's a straightforward way, using magrittr's exported functions, to create a new pipe operator that allows multiple placements but never places the lhs as the first argument.
In other words, would it be easy to define a new pipe, say %>>%, that makes these two commands equivalent?
1:10 %>% {c(min(.), max(.))}
1:10 %>>% c(min(.), max(.))
I'm not suggesting that this functionality should be included in magrittr, as I understand the current design choices are deliberate. I'm just asking if I wanted this functionality in my own code, would it be straightforward to implement using one of the exported functions from magrittr?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi!
I know that if the placeholder is only used in a nested function call, the lhs is also placed as the first argument, and we can override this by wrapping the rhs in braces. However, I'm wondering if there's a straightforward way, using magrittr's exported functions, to create a new pipe operator that allows multiple placements but never places the lhs as the first argument.
In other words, would it be easy to define a new pipe, say
%>>%
, that makes these two commands equivalent?I'm not suggesting that this functionality should be included in magrittr, as I understand the current design choices are deliberate. I'm just asking if I wanted this functionality in my own code, would it be straightforward to implement using one of the exported functions from magrittr?
Thanks!
The text was updated successfully, but these errors were encountered: