Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe doesn't work in basic round function #266

Closed
Yann-C-INN opened this issue May 23, 2023 · 1 comment
Closed

Pipe doesn't work in basic round function #266

Yann-C-INN opened this issue May 23, 2023 · 1 comment

Comments

@Yann-C-INN
Copy link

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-
Copy link
Member

lionel- commented May 23, 2023

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.

@lionel- lionel- closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants