[Rd] Deprecating old pkgDepends(), package.dependencies() in tools

Martin Maechler maechler at stat.math.ethz.ch
Sat Feb 13 10:07:43 CET 2016

We will deprecate the functions pkgDepends(), package.dependencies() 
and 2-3 less prominent ones from package tools, 
in R's development version (short "R-devel"), i.e., the one that
will probably become R 3.3.0 sometime in April. 
Instead,  package_dependencies() should be used, possibly after
non-default use of available.packages() to be used as argument
'db', i.e., conceptually
   package_dependencies(pkg, db = available.packages(.....), .....)

The reason for deprecation is that some of these functions only
work with "Depends", but never with "Imports", etc, i.e., that
code has really been written with 'Depends' only in mind and
hence has not been really useful anymore for a while.  OTOH,
package.dependencies() similarly only uses *one* of "Depends",
"Imports", "Suggests", ....  as opposed to the newer and much
better designed alternative package_dependencies()

To our knowledge there are only four (of > 7600) CRAN packages
affected (("FSA", "Zelig", "checkpoint", "packdep") whose
maintainers are addressed via BCC of this e-mail) and the one or
two Bioconductor packages should have been updated since we
talked about this issue R-core internally.

The "R version dependency" that package.dependencies() have
provided seems to be sufficiently available when creating the
package list via  available.packages(*,  filters = ..).

If you are using one of the deprecated functions and hence will
get a warning, and find it hard to replace that use by
a combination of  available.packages()  and
package_dependencies() {note the "_"}, please ask here, as
we may have overlooked edge cases.

This should make this part of tools-package functionality easier
to maintain (and teach etc).

Martin Maechler

More information about the R-devel mailing list