container_options: Set Container Package Options

View source: R/options.R

container_optionsR Documentation

Set Container Package Options

Description

Set Container Package Options

Usage

container_options(..., .reset = FALSE)

getContainerOption(x, default = NULL)

Arguments

...

any options can be defined, using name = value.

.reset

logical if TRUE, the options are reset to their default and returned.

x

a character string holding an option name.

default

if the specified option is not set in the options list, this value is returned.

Value

  • container_options() returns a list of all set options sorted by name.

  • container_options(name), a list of length one containing the set value, or NULL if it is unset. Can also be multiple names (see Examples).

  • container_options(key = value) sets the option with name key to value and returns the previous options invisibly.

Container Options

  • compare (default = all.equal)

  • useDots (default = TRUE) whether to abbreviate long container elements with ... when exceeding vec.len (see below). If FALSE, they are abbreviated as <<type(length)>>.

  • vec.len (default = 4) the length limit at which container vectors are abbreviated.

Examples

co = container(1L, 1:10, as.list(1:5))
co

container_options(useDots = FALSE)
co

container_options(useDots = TRUE, vec.len = 6)
co

has(co, 1.0)

container_options(compare = "identical")

has(co, 1.0) # still uses 'all.equal'

co2 = container(1L)
has(co2, 1.0)
has(co2, 1L)

container_options()
container_options(.reset = TRUE)

container documentation built on Dec. 11, 2022, 5:19 p.m.