Update a list with new values for elements
update_list(list = list(), ...)
list
to be updated with ...
.
Named elements to update in list
Updated list
.
orig_list <- list(a = 1, b = 3, c = 4)
update_list(orig_list)
#> $a
#> [1] 1
#>
#> $b
#> [1] 3
#>
#> $c
#> [1] 4
#>
update_list(orig_list, a = "a")
#> $a
#> [1] "a"
#>
#> $b
#> [1] 3
#>
#> $c
#> [1] 4
#>
update_list(orig_list, a = 10, b = NULL)
#> $a
#> [1] 10
#>
#> $b
#> [1] 3
#>
#> $c
#> [1] 4
#>