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)
list to populate with names objects
logical: whether to assign to parent frame
invisible list l
populated with objects of the same frame
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
#>