Skip to contents

Renders the result of baseline_equivalence() as a formatted gt table with rounded statistics and readable column labels. Requires the gt package.

Usage

gt_baseline(equivalence, decimals = 2)

Arguments

equivalence

A data frame returned by baseline_equivalence().

decimals

Number of decimal places for the numeric columns. Default 2.

Value

A gt_tbl object.

Examples

if (requireNamespace("gt", quietly = TRUE)) {
  df <- data.frame(
    treat = c(1, 1, 1, 0, 0, 0),
    pretest = c(5, 6, 7, 4, 5, 6),
    female = c(1, 0, 1, 0, 0, 1)
  )
  tbl <- gt_baseline(baseline_equivalence(df, "treat"))
}