packagefinder
packagefinder copied to clipboard
pf$Package: object of type 'closure' is not subsettable
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.