Including tidyverse packages in another package

Viewed 959

Is:

devtools::use_package("tidyverse")

the canonical way in R of importing the set of tidyverse packages into another package? Or would it be preferable to import the packages individually? I expect to use the functionality of all the current tidyverse packages except readr.

2 Answers

The authors of the tidyverse package do explicitly ask package authors to not import this package because it creates unnecessary heavy dependencies in most cases, which means longer download times for your package and higher disk storage requirements for the users of your package and a higher maintenance burden for you (since you have to watch for breaking changes of all of these packages). Also ask yourself if you really need to import all these tidyverse packages or if you could also use base R or write helper functions that achieve what you need. Jim Hester gave a good presentation for package developers about how one could think about dependencies.

At least equally important makes it harder for the authors of the tidyverse to update it on CRAN because it needs to pass all reverse dependency checks.

Related