I'm trying to build a package using dplyr
. I extensively used !!
and !!!
operators from rlang
.
However, I didn't import
them explicitly although the package seems to work nevertheless.
Am I missing something in the environment, or does import(dplyr)
somehow cover this?
As a comment above stated, dplyr
re-exports tidyeval dependencies from rlang
, so if you have dplyr
in Imports you don't need to explicitly import rlang
. However, it might be worth asking whether you need all of dplyr
, or just the tidyeval parts - there's something to be said for keeping dependencies to a minimum. rlang
is a very lightweight package dependency-wise, so if you can get away with depending only on it directly it can make your package faster to install and (in theory) less likely to break with an external update.
If you find yourself using a lot of quoting and unquoting operators in package development, you can also check out the usethis package's "tidyverse development helpers". usethis::use_tidy_eval()
"imports a standard set of helpers to facilitate programming with the tidy eval toolkit." It's a quick and easy way to add rlang
to Imports, and imports/re-exports and documents the (en)quo(s)
, (en)sym(s)
, (en)expr(s)
, functions, .data
pronoun, and :=
. Then you should have what you need to use tidyeval throughout your package.