Resolves and reduces multiple basic_table_args objects
Source: R/basic_table_args.R
resolve_basic_table_args.RdResolving and reducing multiple basic_table_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.
Usage
resolve_basic_table_args(
user_table = basic_table_args(),
user_default = basic_table_args(),
module_table = basic_table_args(),
app_default = getOption("teal.basic_table_args", basic_table_args())
)Arguments
- user_table
(
basic_table_args)
end user setup forrtables::basic_table()of a specific table. Created with thebasic_table_args()function. TheNULLvalue is supported.- user_default
(
basic_table_args)
end user default setup forrtables::basic_table()of a specific table. Created with thebasic_table_args()function. TheNULLvalue is supported.- module_table
(
ggplot2_args)
module creator setup forrtables::basic_table()of a specific table. Created with thebasic_table_args()function. TheNULLvalue is supported.- app_default
(
basic_table_args)
Application level setting. Can beNULL.
Details
The function picks the first non NULL value for each argument, checking in the following order:
basic_table_argsargument provided by the end user. Per table (user_table) and then default (user_default) setup.app_defaultglobal R variable,teal.basic_table_args.module_tablewhich is a module creator setup.
See also
parse_basic_table_args() to parse resolved list into list of calls.
Examples
resolve_basic_table_args(
user_table = basic_table_args(title = "TITLE"),
user_default = basic_table_args(title = "DEFAULT_TITLE", subtitles = "SUBTITLE")
)
#> $title
#> [1] "TITLE"
#>
#> $subtitles
#> [1] "SUBTITLE"
#>
#> attr(,"class")
#> [1] "basic_table_args"