Home > Back-end >  how to use gt::as_word output in a quarto file
how to use gt::as_word output in a quarto file

Time:01-27

The {{gt}} package now includes a enter image description here

CodePudding user response:

No need to print an OOXML string for this purpose I guess – it works with the print() method for docx output:

```{r, echo=F}
library(gt)
gtcars %>%
  dplyr::select(mfr, model) %>%
  dplyr::slice(1:2) %>%
  gt() %>%
  tab_header(
    title = "Data listing from gtcars",
    subtitle = "gtcars is an R dataset"
  )
```

enter image description here

(There's some trouble with the markdown code though, probably a bug. I've removed md().)

  • Related