我想在表格的顶部/底部为表格添加标题。 caption
包中是否有 function
gt
?
gt(head(mtcars)) %>%
tab_header(title="", subtitle="Table 1: Mtcars with gt.") %>%
tab_options(table.width=pct(90),
table.border.top.style=0,
row.padding=px(4)) %>%
tab_style(style=cells_styles(
text_align='left',
text_color='grey'),
locations=cells_title(groups="subtitle"))