Question: List of package names with versions
0
3.8 years ago by
nathan.watsonhaigh0 wrote:

I'd like to get an up-to-date list of all the bioconductor packages together with their version number for a particular BioC version.

I know all_group() will return the list of package names, but I also need the versions. Where can I get these from?

Cheers,

Nathan

packages • 889 views
modified 3.8 years ago by Sushant Pawar0 • written 3.8 years ago by nathan.watsonhaigh0
Answer: List of package names with versions
0
3.8 years ago by
Nashik
Sushant Pawar0 wrote:

you can try this

packinfo <- installed.packages(fields = c("Package", "Version"))
packinfo[,c("Package", "Version")]

Is there a solution which doesn't first require installing everything? Will this only return BioC packages or also those installed via CRAN?

2

See https://bioconductor.org/packages/3.3/bioc/src/contrib/PACKAGES . Substitute your bioconductor version of interest for 3.3.

You can read this within R with the read.dcf() function. Of course, for current release and devel versions, package versions can change over time.

Thanks for this information. Please consider moving it from a comment to an answer.

1

Specify the appropriate 'repos' argument to available.packages(). The appropriate url is from BiocInstaller::biocinstallRepos(), for instance

> biocVersion()
[1] '3.2'
> biocinstallRepos()
BioCsoft
"https://bioconductor.org/packages/3.2/bioc"
BioCann
"https://bioconductor.org/packages/3.2/data/annotation"
BioCexp
"https://bioconductor.org/packages/3.2/data/experiment"
BioCextra
"https://bioconductor.org/packages/3.2/extra"
CRAN
"https://cran.rstudio.com"
> nrow(available.packages(contriburl=contrib.url(biocinstallRepos()[1:4])))
[1] 2264
> nrow(available.packages(contriburl=contrib.url(biocinstallRepos())))
[1] 10259