Builds an Rmd file from data and renders it to HTML.
Usage
generate_report(
data,
theme_set,
correlations_df,
insights,
export_files,
consolidated = NULL,
learning_context = NULL,
provider = NULL,
config = NULL,
output_file = "analysis_report.html",
irr_result = NULL,
comparison_result = NULL,
self_contained = TRUE,
coding_results = NULL,
coding_state = NULL,
excerpt_verification = NULL,
theme_group_tests = NULL,
cooccurrence_tests = NULL,
audit_log = NULL,
response_cache = NULL,
coverage = NULL,
framework_spec = NULL,
framework_archive = NULL,
metric_interpretation = NULL,
methodology_articulations = NULL,
research_coverage = NULL,
temporal_results = NULL
)Arguments
- data
tibble with all analysis columns
- theme_set
ThemeSet object
- correlations_df
Correlations tibble
- insights
Insights list
- export_files
List of export file paths
- consolidated
ConsolidatedCodes list (or NULL)
- learning_context
LearningContext object (or NULL)
- provider
AIProvider object (or NULL)
- config
ThematicConfig object (or NULL)
- output_file
Path for the HTML report
- irr_result
Inter-rater reliability result list (or NULL)
- comparison_result
ComparisonResult object from compare_runs() (or NULL)
- self_contained
If TRUE (default), produce a self-contained HTML file with all resources embedded. Set to FALSE for faster rendering and smaller file size (external CSS/JS will be referenced).
- coding_results
Legacy CodingResults list as returned by
as_coding_results. Used to populate per-theme entry tables with the codes assigned to each entry. Pass NULL to omit the codes column.- coding_state
ProgressiveCodingState with saturation data (or NULL)
- excerpt_verification
Optional list returned by
verify_excerptscontaining substring_stats and (optionally) coherence_stats. When provided, the report's data-quality appendix shows excerpt validation results.- theme_group_tests
Optional tibble returned by
compare_theme_groups(Mann-Whitney U tests). When provided, the correlation section gains a 'Theme Group Comparisons' subsection.- cooccurrence_tests
Optional tibble returned by
test_theme_cooccurrence(chi-square / Fisher tests). When provided, the correlation section gains a 'Theme Co-occurrence' subsection.- audit_log
Optional
AuditLogobject forwarded togenerate_ai_synthesisso the executive-summary AI call is recorded as anai_requestaudit decision.- response_cache
Optional
ResponseCacheobject forwarded togenerate_ai_synthesisso the raw API response is written to the cache and referenced from the audit log.- coverage
Optional
CorpusCoverageobject (T0.3) fromcompute_corpus_coverage. When provided, the report renders a Tier-0 corpus-coverage card asserting that every entry surviving preprocessing reached the LLM (entry-level coverage; within-entry truncation is measured and disclosed when tracked). When NULL the card renders an explicit "coverage not computed" notice rather than silently omitting – absence is itself a transparency signal per AC4.- framework_spec
Optional
FrameworkSpecobject (Mode 3 only). When provided ANDconfig$methodology$modeis"framework_applied", the report renders a Framework Declaration section with the framework's name, citations, epistemic stance, anomaly handling policy, and full constructs list. NULL on Mode 1 / Mode 2 runs.- framework_archive
Optional named list returned by
archive_framework_speccarrying the archived framework's path + sha256 hash. When provided alongsideframework_spec, the Framework Declaration section includes the sha256 fingerprint and a link to the archived spec.- metric_interpretation
Optional
MetricInterpretation(from the Methodology Assistant). Threaded toaggregate_theme_statisticsso per-subtheme stats are computed via the AI's chosen primitives (per-column, matched by name) with the legacy battery as fallback. NULL -> legacy only.- methodology_articulations
Optional
MethodologyArticulationsbundle. Drives the report's "Methodology Setup" section (relevance criterion + per-metric interpretations + per-theme temporal panel). When NULL, the renderer falls back to reading the archivedrules/methodology_articulations.jsonunder the output dir if present; when neither is available the section is omitted. When supplied andmetric_interpretationis NULL, the metric interpretation is derived from this bundle.- research_coverage
Optional
ResearchCoverageobject (Mode 2 only). Drives the "Research-question coverage" section – where each named focus facet landed across the themes. When NULL, the renderer falls back to the archivedrules/research_coverage.jsonunder the output dir if present; when neither is available (or no separable facets were found) the section is omitted.- temporal_results
Optional list from
analyze_temporal_patterns. Drives the "Longitudinal Patterns" section (period granularity, theme prevalence over time, theme emergence). Each chart is embedded only when its PNG exists in the output directory (the prevalence chart requires more than one time period; the emergence chart at least one dated theme). NULL -> the section is omitted.