Skip to contents

Creates a self-contained Quarto source file containing dataset diagnostics, variable summaries, warnings, and formula definitions. Set render = TRUE to render the report through the optional quarto package.

Usage

datasum_report(
  data,
  path = NULL,
  format = c("qmd", "html", "pdf", "docx"),
  title = "DataSum Diagnostic Report",
  by = NULL,
  alpha = 0.05,
  digits = 3,
  render = FALSE
)

Arguments

data

A data frame or tibble.

path

Output path. When render = FALSE, this should usually end in .qmd. If omitted, a temporary .qmd file is created.

format

One of "qmd", "html", "pdf", or "docx".

title

Report title.

by

Optional grouping columns passed to profile_data().

alpha

Significance level for normality decisions.

digits

Optional number of digits used to round numeric output.

render

Logical; if TRUE, render the Quarto document. Rendering requires the optional quarto package and a working Quarto installation.

Value

The generated file path, invisibly.

Examples

report <- datasum_report(iris, render = FALSE)
file.exists(report)
#> [1] TRUE