pkgnet icon indicating copy to clipboard operation
pkgnet copied to clipboard

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

Open jameslamb opened this issue 6 years ago • 0 comments

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):

  • alphahull, spatstat.data
  • BradleyTerry2, profileModel
  • brms, StanHeaders
  • brglm, profileModel
  • btergm, ergm.count
  • cartogram, spData
  • classInt, spData
  • csampling, marg
  • doRedis, rredis
  • doRNG, rngtools
  • Ecdat, Ecfun
  • ei, gmm
  • geojsonio, spData
  • kangar00, biomaRt
  • mapview, spData
  • OceanView, plot3D
  • pgirmess, spData
  • prefmod, gnm
  • prim, rgl
  • RH2, RJDBC
  • randtoolbox, rngWELL
  • rnaturalearth, spData
  • rstan, StanHeaders
  • spam, dotCall64
  • spatstat, spatstat.data
  • splm, spData
  • statnet, ergm.count
  • tm, NLP
  • tmap, spData
  • tmapdata, spData
  • tmvtnorm, gmm
  • ZeligEI, gmm

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

jameslamb avatar Oct 22 '19 03:10 jameslamb