<-
tab_rtf |>
gtcars ::select(mfr, model) |>
dplyr::slice(1:2) |>
dplyrgt() |>
tab_header(
title = md("Data listing from **gtcars**"),
subtitle = md("`gtcars` is an R dataset")
|>
) as_word()
The as_word()
function
Use a subset of the gtcars
dataset to create a gt table. Add a header with tab_header()
and then export the table as OOXML code for Word using as_word()