# 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 for consistency
# Set gtsummary theme first
gtsummary::set_gtsummary_theme(gtsummary::theme_gtsummary_compact("jama"))
# 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