cran_package: Specifies a CRAN package to install in environment

Description Usage Arguments Value Examples See Also

View source: R/environment.R

Description

Specifies a CRAN package to install in run environment

Usage

1
cran_package(name, version = NULL, repo = "https://cloud.r-project.org")

Arguments

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".

Value

A named list containing the package specifications

Examples

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))

See Also

r_environment()


azuremlsdk documentation built on Oct. 23, 2020, 8:22 p.m.