wbstats
wbstats copied to clipboard
Drop dependence on magrittr package and use pipe operator built into R 4.1.0
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.