library(gt)
tab_1 <-
gtcars |>
dplyr::select(model, year, hp, trq) |>
dplyr::slice(1:5) |>
gt(rowname_col = "model") |>
tab_stubhead(label = "car")
tab_1
tab_1 |> gtsave("tab_1.docx")
==> quarto preview Trial3.qmd --to docx --no-watch-inputs --no-browse
processing file: Trial3.qmd
|............................................. | 86% [unnamed-chunk-3]Unknown output format doc
Pandoc can convert to DOCX, but not to DOC.
Error:
! pandoc document conversion failed with error 22
Backtrace:
- global .main()
- execute(...)
- rmarkdown::render(...)
- knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
- knitr:::process_file(text, output)
... - base::withRestarts(...)
- base (local) withRestartList(expr, restarts)
- base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
- base (local) docall(restart$handler, restartArgs)
- evaluate (local) fun(base::quote(
<smplErrr>
))