Fill in maned objects of a list with the value of named objects in the parent frame in which the list has been created. This objects must have the same names as the objects of the list

fillin_list(l, assign = TRUE)

Arguments

l

list to populate with names objects

assign

logical: whether to assign to parent frame

Value

invisible list l populated with objects of the same frame

Examples

l <- list(x = NULL,
y = NULL,
z = NULL)

x <-  2
y <-  "f"
z <- TRUE
fillin_list(l)
l
#> $x
#> [1] 2
#> 
#> $y
#> [1] "f"
#> 
#> $z
#> [1] TRUE
#>