packagefinder icon indicating copy to clipboard operation
packagefinder copied to clipboard

pf$Package: object of type 'closure' is not subsettable

Open Kupac opened this issue 5 months ago • 0 comments

Package installation fails on Nix with the following error message:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'packagefinder':
 .onAttach failed in attachNamespace() for 'packagefinder', details:
  call: pf$Package
  error: object of type 'closure' is not subsettable

It looks like pf is not a data.frame or NULL, but a function? I fixed it with the following change in .onAttach() (compared to the current CRAN version): if(!is.null(pf))if(is.data.frame(pf)), because the result of tools::CRAN_package_db() must be a data frame according to its help page.

Kupac avatar Nov 15 '25 11:11 Kupac