% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporting.R
\name{render_report}
\alias{render_report}
\title{Render a reproducible survey report}
\usage{
render_report(
  instrument,
  data = NULL,
  output_file = NULL,
  output_path = NULL,
  format = c("html"),
  include_quality = TRUE,
  include_reliability = TRUE,
  include_codebook = TRUE,
  include_missing = TRUE,
  include_descriptives = TRUE,
  include_analysis = TRUE,
  include_models = TRUE
)
}
\arguments{
\item{instrument}{An \code{sframe} object.}

\item{data}{A \code{tibble} or \code{data.frame} of responses, or NULL to generate a
codebook-only report.}

\item{output_file}{Character or NULL. The output file path. When NULL, a
temporary file is written and its path returned.}

\item{output_path}{Character or NULL. Alias for \code{output_file}. If both are
supplied, \code{output_file} takes precedence.}

\item{format}{Character. Output format. Currently \code{"html"}.}

\item{include_quality}{Logical. Whether to include the data quality report.
Requires \code{data}. Defaults to \code{TRUE}.}

\item{include_reliability}{Logical. Whether to include reliability
diagnostics. Requires \code{data}. Defaults to \code{TRUE}.}

\item{include_codebook}{Logical. Whether to include the instrument codebook.
Defaults to \code{TRUE}.}

\item{include_missing}{Logical. Whether to include the missing-data report.
Requires \code{data}. Defaults to \code{TRUE}.}

\item{include_descriptives}{Logical. Whether to include descriptive
statistics. Requires \code{data}. Defaults to \code{TRUE}.}

\item{include_analysis}{Logical. Whether to include analysis-plan results
when \code{data} are supplied and the instrument has an \code{analysis_plan}.}

\item{include_models}{Logical. Whether to include saved model JSON and
generated syntax blocks. Defaults to \code{TRUE}.}
}
\value{
The output file path, invisibly.
}
\description{
Generates an HTML report that includes the instrument codebook, data
quality summary, reliability diagnostics, and analysis-plan content.
When Quarto and the bundled template are available, the report is rendered
through Quarto. Otherwise, surveyframe writes an internal HTML fallback so
the reporting workflow still runs on machines without Quarto.
}
\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"
)
old <- options(surveyframe.use_quarto = FALSE)
out <- tryCatch(
  render_report(
    instr,
    data = responses,
    output_file = tempfile(fileext = ".html"),
    include_reliability = FALSE,
    include_analysis = FALSE
  ),
  finally = options(old)
)
file.exists(out)
}
\seealso{
\code{\link[=codebook_report]{codebook_report()}}, \code{\link[=quality_report]{quality_report()}}, \code{\link[=reliability_report]{reliability_report()}}
}
