I was thinking of stop using magrittr library since now we have |>
operator.
But apparently they are not the same - the new operator produces error. See below
library(magrittr)
library(ggplot2)
library(data.table)
diamonds %>% setDT
# runs ok
diamonds |> setDT
# doesnot run
> Error: The pipe operator requires a function call as RHS
Is that supposed to be that way?
When is it recommended to use %>%
vs. |>
?