I am using the pipe operator (%>%) from magrittr (via dplyr) in a package I am developing.
I have run usethis::use_package("dplyr")
, and this makes the necessary adjustments to import dplyr.
But when running a function that uses the pipe operator, I get the following error:
Cannot find the function "%>%"
Usually that's because you need to prefix the function by referencing the package it came from e.g., dplyr::filter
. However, if I call the pipe-operator like: dplyr::%>%
I get an unexpected token error.
So how do I use the pipe operator in my package?