inject: Inject a list into the current environment.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

For example, if we call this function with list(a = 1, b = 2), it will create local variables a and b with values 1 and 2, respectively.

Usage

1
inject(values, where = parent.frame())

Arguments

values

list. A named list of values.

where

environment. Where should we inject this list? The default is parent.frame(), the calling environment.

Value

NULL – the values will be injected into where.

Examples

1
2
inject(list(a = 1, b = 2))
stopifnot(exists('a') && exists('b'))

robertzk/refclass documentation built on May 25, 2017, 6:37 a.m.