uptake / pkgnet

R package for analyzing other R packages via graph representations of their dependencies
https://uptake.github.io/pkgnet/
Other
152 stars 37 forks source link

CreatePackageReport() fails with error "there is no package" #253

Closed jameslamb closed 5 months ago

jameslamb commented 4 years ago

I'm unsure of the exact issue, but the Function Network (produced FunctionReporter) is broken for some packages.

To reproduce:

pkg_name <- YOUR_PACKAGE_NAME
CreatePackageReport(
    pkg_name
    , report_path = file.path(getwd(), "report.html")
)

This produces an error like the following:

## Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called 'spatstat.data'

For the following combinations of (YOUR_PACKAGE_NAME, package in error message):

Fixing this error probably means finding the common thread between how each of those packages uses the package being complained about.

I can confirm that each of the "could not find packages" is something that I don't have installed locally. So maybe the issue is that all of those are in Suggests or LinkingTo or Enhances (meaning I didn't need to install them) but something in our code is finding a hard dependency on them.

discovered via the code in #252