View source: R/analysis_plan.R
| render_results | R Documentation |
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.
render_results(
results = NULL,
instrument,
output_file = NULL,
output_path = NULL,
citation_format = c("apa", "ama", "vancouver"),
title = NULL,
interpretations = NULL
)
results |
An |
instrument |
An |
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 |
citation_format |
Character. Reference format. One of |
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 in place of the pre-declared prompt fallback. Blocks without an entry render exactly as they do when this argument is NULL. Interpretations are report content only and are never written into the instrument. |
The output file path, invisibly.
run_analysis_plan(), render_report()
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"
)
results <- run_analysis_plan(responses, instr)
out <- render_results(results, instr,
output_file = tempfile(fileext = ".html"))
file.exists(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.