Skip to contents

Populates session data for testing or to load a specific analysis.

Usage

FM_app_preload(
  session,
  sources = NULL,
  react_state = list(),
  quickload = FALSE
)

Arguments

session

Shiny session variable (in app) or a list (outside of app)

sources

Vector of at corresponds with the ID used to call the modules UI elements

react_state

Reactive shiny object (in app) or a list (outside of app) used to trigger reactions

quickload

Logical TRUE to load reduced analysis FALSE to load the full analysis

Value

list with the following elements

  • isgood: Boolean indicating the exit status of the function.

  • msgs: Messages to be passed back to the user.

  • all_sess_res: List containing the result for each module stored in the list name with the module ID.

  • session: Returning the session variable to be used in scripting (not in app).

Examples

sources=c(system.file(package="formods", "preload", "ASM_preload.yaml"),
          system.file(package="formods", "preload", "UD_preload.yaml"))
res = FM_app_preload(session=list(), sources=sources)
#>  Module ASM, mod_yaml does not exist: config/ASM.yaml
#>  Module ASM, fm_yaml does not exist: config/formods.yaml
#>  Module UD, mod_yaml does not exist: config/UD.yaml
#>  Module UD, fm_yaml does not exist: config/formods.yaml
#> → # preload_complete is good: FALSE -----------------------------------------
#> → # Module ASM, mod_yaml does not exist: config/ASM.yaml
#> → # Module ASM, fm_yaml does not exist: config/formods.yaml
#> → # Module UD, mod_yaml does not exist: config/UD.yaml
#> → # Module UD, fm_yaml does not exist: config/formods.yaml