# Basic usage with a data frame
mtcars |>
head() |>
gt::gt() |>
theme_gt_compact()
# Combine with other gt functions
mtcars |>
head() |>
gt::gt() |>
gt::tab_header(title = "Vehicle Data") |>
theme_gt_compact()
# Use alongside gtsummary tables with sumExtras for consistency
# Set JAMA theme first
use_jama_theme()
# Then both tables will have matching appearance
summary_table <- gtsummary::trial |>
gtsummary::tbl_summary()
data_table <- gtsummary::trial |>
head() |>
gt::gt() |>
theme_gt_compact()
Run the code above in your browser using DataLab