FM_fetch_app_code: Fetches the Code to Reproduce Analysis

View source: R/formods.R

FM_fetch_app_codeR Documentation

Fetches the Code to Reproduce Analysis

Description

Takes the current state of the app and builds a script to reproduce the analysis within the app.

Usage

FM_fetch_app_code(session, state, mod_ids)

Arguments

session

Shiny session variable

state

module state after yaml read

mod_ids

Vector of module IDs and order they are needed (used for code generation).

Value

list with the following elements:

  • isgood: Boolean indicating the whether code generation was successful (TRUE)

  • msgs: Any messages generated

  • code: Code to regenerate the app

Examples

# We need a Shiny session object to use this function:
sess_res = DW_test_mksession()
session = sess_res$session
state   = sess_res$state
app_code = FM_fetch_app_code(session = session,
                             state   = state,
                             mod_ids = c("UD", "DW"))
cat(app_code$code)

formods documentation built on April 12, 2025, 1:57 a.m.