FixupList | R Documentation |
Checks a list for falsy or missing values and replaces them by values taken from a default. Remove extraneous elements in x that aren't part of the default. Add missing elements in x. Replace falsy values in x by default values.
FixupList(x, Default)
x |
A named list to fix |
Default |
A named list of default values |
The fixed list
# FixupList(list(a=1, b=NA, c=3, d=NA), list(a=4, d=8, c=9, x=7)) #> list(a=1, c=3, d=8, x=7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.