R devtools:document Dependency package not available

If you are having problems with this, even when you have the packages installed and loaded, I suggest you to do the following.

  • Delete the Imports: and Suggests: entries of your DESCRIPTION file.
  • Make sure you have usethis working by doing library(usethis)
  • Now start adding the libraries to your DESCRIPTION file, by running the following command on your console: usethis::use_package("dplyr") for any Imports: you need. Repeat this step for every library that is required.

In my case, dplyr was the one refusing to load. You can decide where the package will be located by doing: usethis::use_package("dplyr", "Suggests").


It is assumed that you will have the required tools / dependencies for developing a package when you are doing so.

utils::install.packages has a dependencies argument that will attempt to install uninstalled packages on which a package depends / (in whichever way they are dependent (suggests/ depends/linkingTo).

devtools::install_github will perform similarly.

Installing a package and documenting it as a component of development are quiet different activities .

Tags:

R

Devtools