list_along.Rd
It can be useful to create an list with default values and some settable values. This is similar to the idea of seq_along(), which creates a vector of the same length as its input.
list_along(names, default = NA, some = NA)
names | names of the list to be generated |
---|---|
default | default value for each element of the generated list |
some | a list with elements whose names should be included in |
a list
#> $A #> [1] NA #> #> $B #> [1] 1 #> #> $C #> [1] NA #>