View source: R/utility_functions.R
unpack_args | R Documentation |
Assign the elements of a named list in current environment.
unpack_args(args)
args |
List of entities to be assigned. |
This function takes a list of named entities and assigns each element of the list to its name in the calling environment.
assign, parent.frame
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.