% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report.R
\name{wf_report}
\alias{wf_report}
\title{Build a weighting quality report}
\usage{
wf_report(
  w,
  target = NULL,
  audience = c("manager", "analyst", "decision", "statistician"),
  lang = NULL,
  output = c("object", "markdown", "html"),
  file = NULL
)
}
\arguments{
\item{w}{A \code{wf_weights}, \code{wf_blend_result}, \code{wf_safe_workflow}, or
\code{wf_impact} object.}

\item{target}{Optional \code{wf_target} for margin-residual diagnostics.}

\item{audience}{Report projection: \code{"manager"}/\code{"decision"} for a compact
decision view or \code{"analyst"}/\code{"statistician"} for full detail.}

\item{lang}{Output language. Resolution follows explicit argument,
\code{options(wfc.lang)}, session locale, then English fallback.}

\item{output}{Return a structured object, Markdown, or standalone HTML.}

\item{file}{Optional output path for Markdown or HTML.}
}
\value{
A \code{wf_quality_report} for \code{output = "object"}; otherwise a rendered
character string, or invisibly the structured report when \code{file} is used.
}
\description{
Creates one structured dossier with manager and analyst projections. It can
report calibrated/composed weights or a blend result and render the same
payload as Markdown or dependency-free HTML.
}
\examples{
# Panel attrition weights are derived from the panel itself, so this
# example runs end to end. Reporting calibrated weights follows the same
# call; see vignette("safe-weighting-workflow") for that path, which
# additionally requires a verified target and a recorded approval.
panel <- data.frame(
  id = paste0("p", 1:24),
  region = rep(c("A", "B"), each = 12),
  retained = rep(c(TRUE, TRUE, TRUE, FALSE), times = 6),
  age = rep(c(25, 35, 45, 55, 65, 75), times = 4),
  sex = rep(c("female", "male"), times = 12),
  stringsAsFactors = FALSE
)
weights <- wf_attrition(
  panel,
  retained = "retained",
  formula = ~ age + sex,
  id = "id",
  by = "region"
)

wf_report(weights, audience = "decision")

analyst <- wf_report(weights, audience = "statistician")
names(analyst$sections)
}
