why does 136/13.00 %>% round()
return 10? The same input without the piper returns the correct value
136/13.00 %>% round()
[1] 10.46154
> round(136/13.00)
[1] 10
10.46154 %>% round()
[1] 10
Looks like operator precedence
(136/13) %>%
round
#[1] 10
We can also make it a bit more chainy
136 %>%
`/`(13) %>%
round
#[1] 10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With