render_reference_table: Render Reference Simulation Table as gt

View source: R/simulation_tables.R

render_reference_tableR Documentation

Render Reference Simulation Table as gt

Description

Converts a data frame of pre-computed reference simulation results (e.g., digitized from a published LaTeX table) into a styled gt table. This is useful for displaying published benchmark results alongside new simulation output within vignettes or reports.

Usage

render_reference_table(
  ref_df,
  title = "Reference Simulation Results",
  subtitle = NULL,
  bold_threshold = 0.05,
  subgroup_notation = c("harm", "benefit")
)

Arguments

ref_df

data.frame. Must contain a Metric column and one column per analysis method, with a Scenario column for row grouping.

title

Character. Table title.

subtitle

Character. Table subtitle. Default: NULL.

bold_threshold

Numeric. Values in any(H) rows exceeding this threshold are shown in bold. Set NULL to disable. Default: 0.05.

subgroup_notation

Character. "harm" (default) labels subgroups as H/Hc; "benefit" labels as G/Gc for benefit-search analyses (treatment switching).

Value

A gt table object.

Examples

## Not run: 
ref <- data.frame(
  Scenario = "M1 Null: N=700",
  Metric   = "any(H)",
  FS       = 0.02,
  FSlg     = 0.03,
  GRF      = 0.25
)
render_reference_table(ref, title = "Reference Results")

## End(Not run)


forestsearch documentation built on Nov. 15, 2026, 9:06 a.m.