NCA_append_report {ruminate}R Documentation

Append Report Elements

Description

Takes an NCA state object and appends any reportable elements for the specified report type. On NCA analyses that are in a "good" state will be reported. Those not in a good state will be ignored.

Usage

NCA_append_report(state, rpt, rpttype, gen_code_only = FALSE)

Arguments

state

NCA state from NCA_fetch_state()

rpt

Report with the current content of the report which will be appended to in this function. For details on the structure see the documentation for FM_generate_report.

rpttype

Type of report to generate (supported "xlsx", "pptx", "docx").

gen_code_only

Boolean value indicating that only code should be generated (FALSE).

Value

list containing the following elements

See Also

FM_generate_report

Examples

# We need a state object to use below
sess_res = NCA_test_mksession(session=list(), full_session=FALSE)
state = sess_res$state

# here we need an empty report object for tabular data
rpt = list(summary = list(), sheets=list())

# Now we append the report indicating we want
# Excel output:
rpt_res = NCA_append_report(state,
 rpt           = rpt,
 rpttype       = "xlsx",
 gen_code_only = TRUE)

# Shows if report elements are present
rpt_res$hasrptele

# Code chunk to generate report element
cat(paste(rpt_res$code, collapse="\n"))

[Package ruminate version 0.2.2 Index]