View source: R/call-flexibly.R
make_available | R Documentation |
Programming aid: See details for more information on how to use it.
make_available(..., verbose = TRUE)
... |
Named lists provided as named arguments. |
verbose |
Logical. If set to TRUE informative messages regarding the computational progress will be printed. (Warning messages will always be printed.) |
Works in combinaiton with call_flexibly
. Provided named lists of ...
are joined to one overall list whoose slots are the argument lists for all flexibly called
functions and whoose names correspond to the function names. It calls base::assign()
within purrr::imap()
to assign every argument list to the environment of the calling
function in order that all flexible calls find their argument lists.
# Not run:
example_fun <- function(...){
make_available(...)
ggplot(data = mtcars, mapping = aes(x = wt, y = hp)) +
call_flexibly(fn = "geom_point", fn.ns = "ggplot2") +
call_flexibly(fn = "theme", fn.ns = "ggplot2")
}
gp_list <- list(color = "red", size = 4, shape = 15)
theme_list <- list(panel.background = element_rect(fill = "red", colour = "black"))
example_fun(geom_point = gp_list, theme = theme_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.