Skip to contents

Generates publication-ready Typst table code with #table(columns: ...), bracketed confidence intervals, and superscript LOINC code footnotes.

Usage

table1_to_typst(
  table1_data,
  output_path = NULL,
  which_table = "table1",
  caption = NULL,
  label = NULL,
  include_loinc_footnotes = TRUE,
  loinc_map = NULL,
  loinc_footnotes = NULL,
  font_size = "9pt",
  provenance_notes = NULL,
  include_provenance_footnotes = TRUE,
  ...
)

Arguments

table1_data

Result list from generate_table1() or a data.frame.

output_path

Optional file path to write output (.typ).

which_table

Name of table to export ("table1" or "table1b").

caption

Table caption (default: "Baseline Demographic and Clinical Characteristics").

label

Typst figure label (e.g. "tbl-baseline").

include_loinc_footnotes

Logical; whether to generate superscript LOINC code footnotes (default TRUE).

loinc_map

Optional named list of LOINC codes by variable name.

loinc_footnotes

Optional named list or vector of LOINC codes or footnotes.

font_size

Font size for table content (default: "9pt").

provenance_notes

Optional named list mapping variable names to provenance metadata dictionaries.

include_provenance_footnotes

Logical; whether to generate superscript provenance footnotes (default TRUE).

...

Additional arguments.

Value

Formatted Typst character string.