Provides a general method for passing arguments to shiny apps allowing for dynamic customization.
add_options(
opts,
dir,
theme = "flatly",
icon = NULL,
img = NULL,
git_user = NULL
)
A list
of additional options or objects to pass to a shiny app
A character
string indicating the path to the directory containing ui.R and server.R
A character
string naming a Bootswatch color theme (used by shinythemes::shinytheme
)
A character
string naming a fontAwesome icon to be placed in the footer of a navbarPage app
A character
string for the path/url of an image to be placed in the footer of a navbarPage app
A character
string for github username used in the branding link
A list of shiny options set with shinyOptions
Shiny apps are not functions. Thus, customization options cannot be
passed to a shiny app as simply as arguments are passed between functions. Further,
the manner in which objects are loaded prior to deploying an app differ if the app
will be published as a stand-alone or embedded within an rmarkdown docmuent.
Assigning objects as shiny::shinyOptions
ensures that these values are
passed to a shiny app and can be deployed.