| generate_report | R Documentation |
Creates a markdown report from QCA analysis results. Supports two formats: "full" (comprehensive) and "simple" (for manuscripts).
generate_report(
result,
output_file = "qca_report.md",
format = c("full", "simple"),
title = "QCA Analysis Report",
dat = NULL,
desc_vars = NULL,
include_chart = TRUE,
chart_symbol_set = c("unicode", "ascii", "latex"),
chart_level = c("term", "summary"),
solution_note = TRUE,
solution_note_style = c("simple", "detailed"),
solution_note_lang = c("en", "ja"),
include_raw_output = TRUE
)
result |
A result object from any Sweep function with
|
output_file |
Character. Path to output markdown file. |
format |
Character. Report format: |
title |
Character. Report title. |
dat |
Optional data frame. Original data for descriptive statistics. |
desc_vars |
Optional character vector. Variables for descriptive statistics. If NULL and dat is provided, uses Yvar and Xvars from params. |
include_chart |
Logical. If TRUE (default), includes configuration charts (Fiss-style tables) in the report for each threshold. |
chart_symbol_set |
Character. Symbol set for configuration charts:
|
chart_level |
Character. Chart aggregation level:
|
solution_note |
Logical. If TRUE (default), adds a note when multiple equivalent solutions exist explaining that M1 is shown. |
solution_note_style |
Character. Style of solution note:
|
solution_note_lang |
Character. Language for solution notes:
|
include_raw_output |
Logical. If TRUE (default), includes the raw QCA package output (print(sol)) for each threshold for verification purposes. |
Invisibly returns the path to the generated report.
## Not run:
data(sample_data)
thrX <- c(X1 = 7, X2 = 7, X3 = 7)
result <- otSweep(
dat = sample_data,
outcome = "Y",
conditions = c("X1", "X2", "X3"),
sweep_range = 6:8,
thrX = thrX,
return_details = TRUE
)
# With descriptive statistics and configuration charts
generate_report(result, "my_report.md", format = "full",
dat = sample_data, include_chart = TRUE)
# Without configuration charts
generate_report(result, "my_report.md", format = "simple",
include_chart = FALSE)
# With Fiss-style term-level charts (default, recommended for publications)
generate_report(result, "my_report.md", format = "full")
# With threshold-level summary charts
generate_report(result, "my_report.md", format = "full",
chart_level = "summary")
# With detailed solution notes (including EPIs)
generate_report(result, "my_report.md", format = "full",
solution_note_style = "detailed")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.