简体   繁体   中英

How to exclude packages for updating in R?

I want to keep some packages downloaded from CRAN/Bioconductor in the older version while I could update other packages using commands like biocLite() .

How could I make a black list and tell R not to update specific packages?

Thanks!

You can prepare an "updatable" list of packages, then call biocLite

blacklist <- c("pkga", "pkgb")
installed <- rownames(installed.packages())
updatable <- installed[!installed %in% blacklist]
biocLite(updatable)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM