DW_init_state {formods}R Documentation

Initialize DW Module State

Description

Creates a list of the initialized module state

Usage

DW_init_state(FM_yaml_file, MOD_yaml_file, id, id_UD, 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

id_UD

ID string for the upload data module used to handle uploads or the name of the list element in react_state where the data set is stored.

session

Shiny session variable module (NULL)

Value

list containing an empty DW state

Examples

# Within shiny both session and input variables will exist,
# this creates examples here for testing purposes:
sess_res = DW_test_mksession(session=list())
session = sess_res$session
input   = sess_res$input

state = DW_init_state(
   FM_yaml_file  = system.file(package = "formods",
                               "templates",
                               "formods.yaml"),
   MOD_yaml_file = system.file(package = "formods",
                               "templates",
                               "DW.yaml"),
   id              = "DW",
   id_UD           = "UD",
   session         = session)

state

[Package formods version 0.1.6 Index]