3 ms·
I realise I'm in the minority, but I personally like using the right assignment operator (->) with pipes because it maintains the flow of the code when reading.
by Lyngbakr 3y ago
I realise I'm in the minority, but I personally like using the right assignment operator (->) with pipes because it maintains the flow of the code when reading.
mtcars |>
filter(am == 1) |>
select(mpg, gear) -> df
- fhsm 3y agoThis is the only setting in which I use right assignment and I do so routinely for exactly the same reason. I don’t see every using a read and replace pipe operator over the right assignment approach.
- tylermw 3y agoAgreed--the R base pipe and right assignment operator obviate the need for a pipe assignment operator.