[Rd] tools::package_dependencies problems

Bill Dunlap w||||@mwdun|@p @end|ng |rom gm@||@com
Sat Oct 17 01:23:43 CEST 2020


Have you tried using the 'db' argument to tools::package_dependencies?
rbind the common columns of installed.packages() and available.packages()
and use that as the package database.
    installed <- installed.packages()
    available <- available.packages()
    commonCols <- intersect(colnames(installed),colnames(available))
    db <- rbind(installed[commonCols,], available[commonCols,])
    tools::package_dependencies("somePkg", db=db)

List the types of dependencies you want in the 'which' argument, e.g.
which=c("Depends","Imports","LinkingTo","Suggests").

In R-devel now (but not R-4.0.2 and I haven't downloaded 4.0.3 yet) you can
use nicknames for which ("strong"=DIL, "most"="strong"+"Suggests", or
"all"="most"+"Enhances") and can also use recursive=columnNames to use a
smaller set of columns when recursing.  Recursing with "Suggests" or
"Enhances" can give you a huge number of usually irrelevant packages.

On Fri, Oct 16, 2020 at 3:28 PM Spencer Graves <spencer.graves using prodsyse.com>
wrote:

> Hello, All:
>
>
>           tools::package_dependencies('Ecfun') failed to find how my
> development version of Ecfun was using rJava, which generated errors in
> "R CMD build Ecfun".  This is because package_dependencies by default
> uses CRAN and ignores locally installed packages.
>
>
>           What do you think about having this function check both locally
> installed and CRAN versions?
>
>
>           It can probably be done, but I don't see how at the moment.
>
>
>           Also, the traditional interpretation of a help file with Usage
> including an argument 'which = c("Depends", "Imports", "LinkingTo")' is
> that specifying nothing defaults to "Depends".  In this case, it
> defaults to "Imports".  Moreover, I don't see a way to trace "Suggests".
>
>
>           ???
>           Thanks,
>           Spencer Graves
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list