# NOT RUN {
# Create a table object using the
# `exibble` dataset; use the `row`
# and `group` columns to add a stub
# and row groups
tab_1 <-
exibble %>%
gt(
rowname_col = "row",
groupname_col = "group"
)
# The resulting object can be used
# in transformations (with `tab_*()`,
# `fmt_*()`, `cols_*()` functions)
tab_2 <-
tab_1 %>%
tab_header(
title = "Table Title",
subtitle = "Subtitle"
) %>%
fmt_number(
columns = vars(num),
decimals = 2
) %>%
cols_label(num = "number")
# }
Run the code above in your browser using DataLab