Learn R Programming

formods (version 0.2.1)

FM_fetch_app_code: 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)

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

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).

Examples

Run this code
# 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)

Run the code above in your browser using DataLab