tools package that comes with base R makes checking reverse dependencies super easy.
- Build your package tarball (the
R CMD build /your/package/location
It is a good idea to make sure that the tarball is in a dedicated directory, because the next step will download and install reverse dependencies in the directory where the tarball resides.
- In an R terminal type
result <- check_packages_in_dir("/directory/containing/tarball" , revdep = list() )
The result can be printed and summarized and analyzed further if there is any breakage. Here’s an example of output when I ran this on my gower package today.
> result Check results for packages in dir '/home/mark/projects/gower/output': Package sources: 1, Reverse depends: 5 Use summary() for more information. > summary(result) Check results for packages in dir '/home/mark/projects/gower/output': Check status summary: ERROR NOTE OK Source packages 0 0 1 Reverse depends 1 3 1 Check results summary: gower ... OK rdepends_ceterisParibus ... NOTE * checking dependencies in R code ... NOTE rdepends_lime ... ERROR * checking tests ... ERROR * checking re-building of vignette outputs ... WARNING rdepends_live ... NOTE * checking dependencies in R code ... NOTE rdepends_recipes ... NOTE * checking dependencies in R code ... NOTE rdepends_simputation ... OK
(Checking the logs in
output/rdepends_lime.Rcheck/00check.log shows that
lime fails because of a missing JAVA engine [I just updated my OS and have no JAVA installed yet].)
- Checking reverse dependencies can be done in parallel by setting the
Ncpusargument larger than one.
- Be aware that the documentation states that (R 3.5.2) This functionality is still experimental: interfaces may change in future versions. Nevertheless, it has worked fine for me so far.