| FM_init_state {formods} | R Documentation | 
Initialize a formods State Object
Description
Initializes a formods state object with common elements.
Usage
FM_init_state(
  FM_yaml_file,
  MOD_yaml_file,
  id,
  dep_mod_ids = c(),
  MT,
  button_counters,
  ui_ids,
  ui_hold,
  session
)
Arguments
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  | 
Value
List with state initialized.
Examples
# Within shiny a session variable will exist,
# this creates examples here for testing purposes:
sess_res = UD_test_mksession(session=list())
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
[Package formods version 0.1.6 Index]