Is there a way to tell biocLite() to install a Bioconductor package only if it is not installed already?
At the moment, I am running this code:
source('https://bioconductor.org/biocLite.R')
biocLite(listOfBiocPackages, ask = FALSE, lib = 'output/software/r/package/installation/')
where listOfBiocPackages is a vector of characters with names of Bioconductor packages.
If I update listOfBiocPackages, it is going to reinstall all the other packages again. Is there a way to tell biocLite() to only install packages that are not installed yet?
FWIW
setdiff(listOfBiocPackages, rownames(installed.packages()))
does the same but is clearer and less typing thanlistOfBiocPackages[ which( !listOfBiocPackages %in% rownames(installed.packages()) ) ]
H.