It's possible for an R session to be configured with multiple repositories, each providing different versions of a particular package. In such a case, the rownames of available.packages() may no longer be the package name; they may instead be e.g. digest.1 with tags appended to ensure uniqueness.
To avoid this issue, we should query the "Package" field of the available.packages() output directly.
(Note that normally there will only be a single entry for each package, but this behavior can be adjusted by modifying the filters passed to available.packages())
It's possible for an R session to be configured with multiple repositories, each providing different versions of a particular package. In such a case, the rownames of
available.packages()
may no longer be the package name; they may instead be e.g.digest.1
with tags appended to ensure uniqueness.To avoid this issue, we should query the
"Package"
field of theavailable.packages()
output directly.(Note that normally there will only be a single entry for each package, but this behavior can be adjusted by modifying the filters passed to
available.packages()
)