32  Quarto reports

Quarto combines analysis code, text, tables, and interactive figures in an HTML document. rtemis console summaries can retain their ANSI formatting through fansi.

32.1 Configure formatted output

Place the following chunk after the document’s YAML header:

options(rtemis.output_type = "ansi", fansi.term.cap = c("bright", "256", "truecolor"))
fansi::set_knit_hooks(knitr::knit_hooks, which = c("output", "message"))

fansi.term.cap enables conversion of the ANSI colors used by rtemis. Set results: asis on the hook-setup chunk so that its CSS is handled as HTML. Load rtemis before running the analysis.

check_data(iris)
  iris: A data.frame with 150 rows and 5 columns.

  Data types
  * 4 numeric features
  * 0 integer features
  * 1 factor, which is not ordered
  * 0 character features
  * 0 date features

  Issues
  * 0 constant features
  * 1 duplicate case
  * 0 missing values

  Recommendations
  * Consider removing the duplicate case.

32.2 Include an interactive figure

rtemis.draw::draw_scatter(
  iris[["Sepal.Length"]], iris[["Petal.Length"]], group = iris[["Species"]]
)

Print a widget as a chunk result to include it in the rendered document. Model methods such as plot_true_pred() produce widgets in the same way.

32.3 Report provenance

Save the configuration and run record with the source document. Generated model reports provide Methods and Results text from the recorded fit. When cached execution or Quarto freezing is enabled, re-execute the relevant analysis after changes to data, package versions, or configuration before interpreting the rendered output.

© 2026 E.D. Gennatas