tidyverse / magrittr

Improve the readability of R code with the pipe
https://magrittr.tidyverse.org
Other
957 stars 157 forks source link

Pipe doesn't work in basic round function #266

Closed Yann-C-INN closed 1 year ago

Yann-C-INN commented 1 year ago
image

Hey guys. I think this should really work, as part of the tidy approach using pipes: No reason that this (2054-2000)/2000 %>% round(2) [1] 0.027 Won't be the same as this round(0.027,2) [1] 0.03

lionel- commented 1 year ago

Hello, rewriting the operator precedence rules is out of scope for magrittr, so you'll have to use explicit parentheses. Note that this is also the case with the base |> pipe.