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
Unfortunately, with the deprecation of when() in purrr 1.0.0, while the documentation mentions that one should use if instead, the replacement example does does not correspond to the previous example, where when was used as conditional pipe? Could the documentation seek to provide an equivalent code suggestion?
Thanks!
The text was updated successfully, but these errors were encountered:
thanks @steffen-stell
My point was not about code "working" but the recommended alternative/best practice being documented. Unfortunately, the current documentation does not provide an equivalent code example for what I believe was a common use of when
I don't think there currently is a good alternative for that very specific use case. In my opinion, once you start adding branching to a pipe, you're starting to make a pipe that's going to be hard for other people to understand.
A convenient use of
when()
was as a conditional pipe, as was shown in the example, and as was advocated on Stack (R Conditional evaluation when using the pipe operator %>%).Unfortunately, with the deprecation of
when()
in purrr 1.0.0, while the documentation mentions that one should useif
instead, the replacement example does does not correspond to the previous example, wherewhen
was used as conditional pipe? Could the documentation seek to provide an equivalent code suggestion?Thanks!
The text was updated successfully, but these errors were encountered: