resolve_fallback | R Documentation |
Resolves the value of a fallback chain defined with fallback()
.
resolve_fallback(fallback)
fallback |
A fallback chain defined with |
f <- function(x = fallback(TRUE)) { resolve_fallback(x)$value } f() # with no config files in place, this resolves to the terminal fallback. dir <- tempdir() dir1 <- fs::path(dir, "dir1") fs::dir_create(dir1) yaml::write_yaml(list(frog = 100), fs::path(dir1, "config.yaml")) g <- function(frog = fallback(letters, hierarchy = dir1)) { resolve_fallback(frog)$value } # this should resolve to the fallback declared in dir1 g()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.