Skip to contents

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.

Usage

update_pkg(pkg = NULL, source = NULL)

Arguments

pkg

Character vector. Name(s) of package(s) to update. For GitHub, use "user/repo" format. Only required when source 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().