utility that reconciles/ consolidates user-defined params passed via ejamapp() and settings from global_defaults_ files
Source:R/utils_get_global_defaults_or_user_options.R
get_global_defaults_or_user_options.Rd
utility that reconciles/ consolidates user-defined params passed via ejamapp() and settings from global_defaults_ files
Usage
get_global_defaults_or_user_options(
user_specified_options = NULL,
bookmarking_allowed = "url"
)
Arguments
- user_specified_options
named list of any optional arguments that were in the call to
ejamapp()
- bookmarking_allowed
same as shiny::shinyApp enableBookmarking param
Value
a list of global defaults or user options that ejamapp()
uses as the golem_opts parameter in golem::with_golem_options()
and that later can be retrieved by server or ui via golem::get_golem_options()
or via global_or_param()
(which both do almost the same thing).
Details
This function, called by ejamapp()
,
collects the shiny-app-related default settings that are defined in these places:
any options a user has passed as parameters to
ejamapp()
. If provided, these override defaults specified in global_defaults_*.R files."global_defaults_package" set in file
global_defaults_package.R
– sourced here but also initially by.onAttach()
global defaults set in file
global_defaults_shiny.R
– sourced hereglobal defaults set in file
global_defaults_shiny_public.R
– and in that file, depends on value of isPublic if passed as a param toejamapp()
and consolidates them all as a list, to be available to server/ui.
For more details, see the article about defaults and custom settings.
See other ideas for how to include global.R types of code/settings discussed here