View source: R/option_or_default.R
option_or_default | R Documentation |
Extract value for a named list or use default if key is missing
option_or_default(options, key, default)
options |
Named list |
key |
String key |
default |
Default value to be returned, if key is missing. |
Value from a list or default value
option_or_default(list("A" = 25), "A", 20)
option_or_default(list("A" = 25), "B", 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.