If the user uses bioconductor for biology projects in R and their R library becomes corrupted you can do this command in the R prompt.
>
BiocManager::valid()
At the end of this command it will present a very large R function you can call to fix the installation. Just copy and paste the section that looks like the section in green into the R intepreter and it will try and "fix" the installation.
> BiocManager::valid()
* sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /apps/R/3.5.1-gcc4/lib64/R/lib/libRblas.so
LAPACK: /apps/R/3.5.1-gcc4/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] BiocManager _1.30.10 compiler_3.5.1 tools_3.5.1
Bioconductor version '3.8'
* 116 packages out-of-date
* 0 packages too new
create a valid installation with
BiocManager::install(c(
"annotate", "AnnotationDbi", "assertthat", "backports", "baySeq", "BH",
"Biobase", "BiocGenerics", "BiocInstaller", "BiocParallel", "biomaRt",
"bit", "bit64", "blob", "Cairo", "checkmate", "cli", "colorspace",
"cowplot", "curl", "data.table", "DBI", "DEGseq", "DelayedArray",
"dendextend", "DESeq", "DESeq2", "devtools", "digest", "edgeR", "evaluate",
"fansi", "formatR", "gage", "GeneCycle", "genefilter", "geneplotter",
"GenomeInfoDb", "GenomeInfoDbData", "GenomicFeatures", "GenomicRanges",
"GGally", "ggplot2", "ggridges", "git2r", "glue", "GO.db", "gtable",
"highr", "Hmisc", "htmlTable", "htmltools", "htmlwidgets", "httr",
"igraph", "IRanges", "irlba", "jsonlite", "KEGGREST", "knitr", "lambda.r",
"lazyeval", "limma", "locfit", "markdown", "matrixStats", "mime",
"mixOmics", "monocle", "mvtnorm", "openssl", "org.Hs.eg.db",
"org.Mm.eg.db", "OrganismDbi", "pathview", "pcaMethods", "pheatmap",
"phyloseq", "pillar", "pkgconfig", "plotly", "plyr", "prettyunits",
"qvalue", "R6", "Rcpp", "RcppArmadillo", "RcppProgress", "RCurl", "Rdpack",
"reshape2", "rlang", "ROC", "RSQLite", "rstudioapi", "Rtsne", "S4Vectors",
"scales", "sctransform", "seriation", "stringi", "stringr",
"SummarizedExperiment", "TCC", "tibble", "tidyverse",
"TxDb.Mmusculus.UCSC.mm10.knownGene", "urltools", "whisker", "withr",
"xtable", "XVector", "yaml", "zlibbioc"
), update = TRUE, ask = FALSE)
more details: BiocManager::valid()$too_new, BiocManager::valid()$out_of_date
Source:
https://cran.r-project.org/web/packages/BiocManager/vignettes/BiocManager.html