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

Drop dependence on magrittr package and use pipe operator built into R 4.1.0 #40

Open
luifrancgom opened this issue Aug 5, 2023 · 0 comments

Comments

@luifrancgom
Copy link

luifrancgom commented Aug 5, 2023

Hello Jesse Piburn,

I hope this message finds you well. I wanted to share a suggestion regarding the usage of the pipe operator in your code. I noticed that the %>% operator from the magrittr package is used a few times in your code, specifically around 3 instances in the wbstats::wb_data function.

Considering that the |> operator was introduced in R 4.1.0, I wanted to suggest replacing %>% with |> in your code. This could potentially allow you to reduce your dependence on the magrittr package.

Furthermore, I came across a discussion here that highlights the performance benefits of using the |> operator compared to %>%. It seems that |> is faster, which might be advantageous for your code.

I understand that the wbstats package relies on R (≥ 3.2), so I'm not entirely sure how this change might impact the overall package. However, I wanted to bring this to your attention as a possible improvement worth considering.

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

1 participant