A unified function to update R packages by source. Supports full updates, source-specific updates, or targeted package updates. Automatically sets mirrors (Tsinghua CRAN, Tsinghua Bioconductor) and handles version compatibility checks. Ensures Bioconductor installations specify the correct version to avoid mismatches.
Arguments
- pkg
Character vector. Name(s) of package(s) to update. For GitHub, use
"user/repo"
format. Only required whensource
is specified.- source
Character. The source of the package(s):
"CRAN"
,"GitHub"
(or"gh"
), or"Bioconductor"
(or"bio"
). Optional if updating all installed CRAN and Bioconductor packages.
Value
Invisible NULL
. Outputs update progress and logs via message()
.