rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

don't use rownames when looking for CRAN packages #612

Closed kevinushey closed 3 years ago

kevinushey commented 4 years ago

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