packrat-options {packrat}R Documentation

Get/set packrat project options

Description

Get and set options for the current packrat-managed project.

Usage

get_opts(options = NULL, simplify = TRUE, project = NULL)

set_opts(..., project = NULL, persist = TRUE)

opts

Arguments

options

A character vector of valid option names.

simplify

Boolean; unlist the returned options? Useful for when retrieving a single option.

project

The project directory. When in packrat mode, defaults to the current project; otherwise, defaults to the current working directory.

...

Entries of the form key = value, used for setting packrat project options.

persist

Boolean; persist these options for future sessions?

Valid Options

Examples

## Not run: 
## use 'devtools' and 'knitr' from the user library
packrat::set_opts(external.packages = c("devtools", "knitr"))

## set local repository
packrat::set_opts(local.repos = c("~/projects/R"))

## get the set of 'external packages'
packrat::opts$external.packages()

## set the external packages
packrat::opts$external.packages(c("devtools", "knitr"))

## End(Not run)

[Package packrat version 0.9.2 Index]