| MB_fetch_state | R Documentation |
Merges default app options with the changes made in the UI
MB_fetch_state(
id,
id_ASM,
input,
session,
FM_yaml_file,
MOD_yaml_file,
react_state
)
id |
Shiny module ID |
id_ASM |
ID string for the app state management module used to save and load app states |
input |
Shiny input variable |
session |
Shiny session variable |
FM_yaml_file |
App configuration file with FM as main section. |
MOD_yaml_file |
Module configuration file with MC as main section. |
react_state |
Variable passed to server to allow reaction outside of module ( |
list containing the current state of the app including default values from the yaml file as well as any changes made by the user. The list has the following structure:
yaml: Full contents of the supplied yaml file.
MC: Module components of the yaml file.
MB:
isgood: Boolean object indicating if the file was successfully loaded.
checksum: This is an MD5 sum of the contents element and can be used to detect changes in the state.
MOD_TYPE: Character data containing the type of module "MB"
id: Character data containing the module id module in the session variable.
FM_yaml_file: App configuration file with FM as main section.
MOD_yaml_file: Module configuration file with MC as main section.
# Within shiny both session and input variables will exist,
# this creates examples here for testing purposes:
sess_res = MB_test_mksession()
session = sess_res$session
input = sess_res$input
# Configuration files
FM_yaml_file = system.file(package = "formods", "templates", "formods.yaml")
MOD_yaml_file = system.file(package = "ruminate", "templates", "MB.yaml")
# Creating an empty state object
state = MB_fetch_state(id = "MB",
id_ASM = "ASM",
input = input,
session = session,
FM_yaml_file = FM_yaml_file,
MOD_yaml_file = MOD_yaml_file,
react_state = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.