FG_append_report | R Documentation |
Description
FG_append_report(state, rpt, rpttype, gen_code_only = FALSE)
state |
FG state from |
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 |
rpttype |
Type of report to generate (supported "xlsx", "pptx", "docx"). |
gen_code_only |
Boolean value indicating that only code should be
generated ( |
list containing the following elements
isgood: Return status of the function.
hasrptele: Boolean indicator if the module has any reportable elements.
code: Data wrangling R command.
msgs: Messages to be passed back to the user.
rpt: Report with any additions passed back to the user.
FM_generate_report
sess_res = FG_test_mksession()
state = sess_res$state
# This will read in the default PowerPoint report template
rpt =
onbrand::read_template(
template = system.file(package="onbrand","templates","report.pptx"),
mapping = system.file(package="onbrand","templates","report.yaml"))
rpt_res =
FG_append_report(state = state, rpt = rpt,
rpttype = "pptx", 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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.