This guide covers installation, mirror setup, dependency checks, and
updates for evanverse and related packages.
| Area | Tools |
|---|---|
| Base installation | install.packages(),
devtools::install_github() |
| Mirror configuration | set_mirror() |
| Installation and checks | inst_pkg(), check_pkg() |
| Updates | update_pkg() |
Note: All examples are static (
eval = FALSE). Network-dependent commands require internet access.
set_mirror() - Configure CRAN/Bioconductor mirrorsset_mirror() controls mirror sources used by
inst_pkg() and update_pkg().
# Set both CRAN + Bioconductor mirrors (default mirror: tuna)
set_mirror()
#> v CRAN mirror set to: https://mirrors.tuna.tsinghua.edu.cn/CRAN
#> v Bioconductor mirror set to: https://mirrors.tuna.tsinghua.edu.cn/bioconductor
# CRAN only
set_mirror("cran", "westlake")
# Bioconductor only
set_mirror("bioc", "official")Supported mirror names:
| Scope | Mirrors |
|---|---|
| CRAN | official, rstudio, tuna,
ustc, aliyun, sjtu,
pku, hku, westlake,
nju, sustech |
| Bioconductor | official, tuna, ustc,
westlake, nju |
CRAN-only mirrors cannot be used with repo = "all":
set_mirror("all", "aliyun")
#> Error in `set_mirror()`:
#> ! Mirror "aliyun" is CRAN-only and cannot be used with repo = "all".check_pkg() - Check and optionally auto-install missing
packagescheck_pkg("ggplot2", source = "CRAN")
#> # A tibble: 1 x 4
#> package name installed source
#> <chr> <chr> <lgl> <chr>
#> 1 ggplot2 ggplot2 TRUE CRANcheck_pkg(c("ggplot2", "fakepkg123"), source = "CRAN")
#> v Installed: ggplot2
#> ! Missing: fakepkg123check_pkg(c("ggplot2", "fakepkg123"), source = "CRAN", auto_install = TRUE)
#> i Installing missing packages automatically...For GitHub source, use "user/repo" format:
The following sequence is practical for a fresh environment:
# 1) Install evanverse
install.packages("evanverse")
library(evanverse)
# 2) Set mirrors
set_mirror("all", "tuna")
# 3) Install key dependencies
inst_pkg(c("dplyr", "ggplot2"), source = "CRAN")
inst_pkg("DESeq2", source = "Bioconductor")
# 4) Verify status
check_pkg(c("dplyr", "ggplot2", "DESeq2"), source = "CRAN")
# 5) Keep packages updated
update_pkg(source = "CRAN")?set_mirror, ?inst_pkg,
?check_pkg, ?update_pkg