Generates a self-contained HTML report from the output of
run_analysis_plan(). Each section corresponds to one research question
and includes the APA-formatted statistical result, an interpretation space,
and a reference list.
Usage
render_results(
results = NULL,
instrument,
output_file = NULL,
output_path = NULL,
citation_format = "apa",
title = NULL,
interpretations = NULL
)Arguments
- results
An
sframe_analysis_resultsobject fromrun_analysis_plan().- instrument
An
sframeobject.- output_file
Character or NULL. Path to the output HTML file. When NULL, a temporary file is written and its path returned.
- output_path
Character or NULL. Alias for
output_file.- citation_format
Character. The reference format,
"apa"(APA 7), the only one the report writes."ama"and"vancouver"were accepted before 0.4.3 and never applied, so they are refused with a message.- title
Character or NULL. Report title. Defaults to the instrument title with
" -- Results"appended.- interpretations
Named list or NULL. Written interpretations keyed by analysis-plan block id, added after the results are known. A block with an entry shows that text in its Interpretation section, labelled as written after the results. The hypotheses and planned decision rule a block declared print before its result, with or without an entry. Interpretations are report content only and are never written into the instrument.
Examples
instr <- read_sframe(
system.file("extdata", "tourism_services_demo.sframe",
package = "surveyframe")
)
responses <- read_responses(
system.file("extdata", "tourism_services_responses.csv",
package = "surveyframe"),
instr,
respondent_id = "respondent_id",
submitted_at = "submitted_at",
meta_cols = "started_at"
)
# \donttest{
results <- run_analysis_plan(responses, instr)
out <- render_results(results, instr,
output_file = tempfile(fileext = ".html"))
sframe_show(out)
# }