Description Usage Arguments Value Examples See Also
Specifies a CRAN package to install in run environment
1 | cran_package(name, version = NULL, repo = "https://cloud.r-project.org")
|
name |
The package name |
version |
A string of the package version. If not provided, version will default to latest |
repo |
The base URL of the repository to use, e.g., the URL of a CRAN mirror. If not provided, the package will be pulled from "https://cloud.r-project.org". |
A named list containing the package specifications
1 2 3 4 5 6 7 | pkg1 <- cran_package("ggplot2", version = "3.3.0")
pkg2 <- cran_package("stringr")
pkg3 <- cran_package("ggplot2", version = "0.9.1",
repo = "http://cran.us.r-project.org")
env <- r_environment(name = "r_env",
cran_packages = list(pkg1, pkg2, pkg3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.