| resolve_ggplot2_args | R Documentation |
ggplot2_args objects
Resolving and reducing multiple
ggplot2_args objects.
This function is intended to utilize user provided settings, defaults provided by the module creator and
also teal option. See Details, below, to understand the logic.
resolve_ggplot2_args(
user_plot = ggplot2_args(),
user_default = ggplot2_args(),
module_plot = ggplot2_args(),
app_default = getOption("teal.ggplot2_args", ggplot2_args())
)
user_plot |
( |
user_default |
( |
module_plot |
( |
app_default |
( |
The function picks the first non NULL value for each argument, checking in the following order:
ggplot2_args argument provided by the end user.
Per plot (user_plot) and then default (user_default) setup.
app_default global R variable, teal.ggplot2_args.
module_plot which is a module creator setup.
ggplot2_args object.
parse_ggplot2_args() to parse resolved list into list of calls.
resolve_ggplot2_args(
user_plot = ggplot2_args(
labs = list(title = "TITLE"),
theme = list(title = ggplot2::element_text(size = 20))
),
user_default = ggplot2_args(
labs = list(x = "XLAB")
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.