unpack_args: unpack_args

View source: R/utility_functions.R

unpack_argsR Documentation

unpack_args

Description

Assign the elements of a named list in current environment.

Usage

unpack_args(args)

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

## 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 April 7, 2022, 1:07 a.m.

Related to unpack_args in TSDT...