The DESCRIPTION
file in R packages has several ways of specifying dependencies, e.g. Depends
, Suggests
and Imports
. Which one should I use to specify a dependency that is optional once the package is installed, but required for running R CMD check
?
In my particular case I am using testthat
to run some tests automatically when R CMD check
is run, but during "normal" operation, testthat
is not required. The answer to this question suggests that testthat
should be in Suggests
, but is that enough to ensure that R CMD check
runs correctly?
What I would like to see, if it exists, is a field where I can speciy dependencies that are required only to run R CMD check
, which should fail with an appropriate error message if these packages are not available.