FM_init_state | R Documentation |
Initializes a formods state object with common elements.
FM_init_state(
FM_yaml_file,
MOD_yaml_file,
id,
dep_mod_ids = c(),
MT,
button_counters,
ui_ids,
ui_hold,
session
)
FM_yaml_file |
App configuration file with FM as main section. |
MOD_yaml_file |
Module configuration file with MC as main section. |
id |
Shiny module ID. |
dep_mod_ids |
Vector of module ids this module depends on. |
MT |
Type of module using the short name (e.g. "UD", "FG", etc.). |
button_counters |
Vector of button UI elements that need to be tracked. |
ui_ids |
List of UI ids in the module. |
ui_hold |
Vector of UI elements that require holding. |
session |
Shiny session variable |
List with state initialized.
# Within shiny a session variable will exist,
# this creates examples here for testing purposes:
sess_res = UD_test_mksession()
session = sess_res$session
state = FM_init_state(
FM_yaml_file = system.file(package = "formods",
"templates",
"formods.yaml"),
MOD_yaml_file = system.file(package = "formods",
"templates",
"UD.yaml"),
id = "UD",
MT = "UD",
button_counters = NULL,
ui_ids = NULL,
ui_hold = NULL,
session = session)
state
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.