Closed Enchufa2 closed 1 year ago
No comment with code yet, been meaning to write one for my own use (as I believe I mentioned to your prior to https://github.com/eddelbuettel/r2u/issues/30) and would (at least locally) default to sort via data.table
. If and when I have something I may drop here.
The need is actually broader than bspm
as you and I discussed. It can arise whenever length(.libPaths()) > 1
.
Initial motivation: https://github.com/eddelbuettel/r2u/issues/30. It would be nice to have a mechanism to detect and report shadowed packages, i.e. packages that are available in several
.libPaths()
. In this first iteration, I devise:bspm::shadowed_packages()
, which would work as a thin wrapper aroundinstalled.packages()
. It would filter its output to detect package shadowing and would return a matrix (to follow the same convention) with at least the following columns:Package
,LibPath
,Version
,ShadowPackage
,ShadowLibPath
, andShadowVersion
or similar naming. Basically, the idea is that each row is aPackage
that is being shadowed byShadowPackage
in aShadowLibPath
with higher priority.bspm
startup.binary-source
mode.@eddelbuettel As always, comments welcome.