| inst_pkg | R Documentation |
Install R packages from CRAN, GitHub, Bioconductor, or local source.
Automatically respects mirror settings from set_mirror().
inst_pkg(
pkg = NULL,
source = c("CRAN", "GitHub", "Bioconductor", "Local"),
path = NULL,
...
)
pkg |
Character vector. Package name(s) or GitHub repo (e.g., "user/repo").
Not required for |
source |
Character. Package source: "CRAN", "GitHub", "Bioconductor", "Local". Case-insensitive, first match used. |
path |
Character. Path to local package file (required when |
... |
Additional arguments passed to |
NULL (invisibly). Side effect: installs packages.
## Not run:
# Install from CRAN:
inst_pkg("dplyr", source = "CRAN")
# Install from GitHub:
inst_pkg("hadley/emo", source = "GitHub")
# Install from Bioconductor:
inst_pkg("scRNAseq", source = "Bioconductor")
# Install from local file:
inst_pkg(source = "Local", path = "mypackage.tar.gz")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.