list_along | R Documentation |
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
list_along(names = c("A", "B", "C"), default = NA, some = list(B = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.