unpack_args: unpack_args

Description Usage Arguments Details See Also Examples

View source: R/utility_functions.R

Description

Assign the elements of a named list in current environment.

Usage

1

Arguments

args

List of entities to be assigned.

Details

This function takes a list of named entities and assigns each element of the list to its name in the calling environment.

See Also

assign, parent.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Create a list of named elements
arglist <- list( one = 1, two = 2, color = "blue" )

## The variables one, two, and color do not exist in the current environment
ls()

## Unpack the elements in arglist
unpack_args( arglist )

## Now the variables one, two, and color do exist in the current environment
ls()
one

TSDT documentation built on May 2, 2019, 6:40 a.m.