ASM_save_state {formods}R Documentation

Write State to File for Saving

Description

Called from download handler and used to write a saved state value if that is null

Usage

ASM_save_state(state, session, file_path, pll = NULL)

Arguments

state

ASM state from ASM_fetch_state()

session

Shiny session variable

file_path

File path to write zipped state

pll

Preload list of the format generated by FM_mk_app_preload(). IF set to NULL it will be generated from the contents of the session variable.

Value

This function only writes the state and returns a list with the following elements:

Examples

# Within shiny the session variable will exist
# this creates examples here for testing purposes:
sess_res = ASM_test_mksession()
session = sess_res$session
state   = sess_res$state

ssf  = tempfile(fileext=".zip")

ss_res =
ASM_save_state(state, session,
               file_path  = ssf)

[Package formods version 0.2.0 Index]