How can I display DT::datatable
objects from a rmarkdown
script onto a pdf document? My code so far is breaks down with the following error:
processing file: reportCopy.Rmd
output file: reportCopy.knit.md
Functions that produce HTML output found in document targeting latex output.
Please change the output type of this document to HTML.
Including always_allow_html: yes
in the YAML header suppresses the error, but nothing appears on the pdf.
I would be grateful for any help. My code is currently:
---
title: "DT"
output: pdf_document
---
### Chart 1
```{r}
DT::datatable(head(mtcars))
```
( I don't know if it matters, but my datatables are in fact created in a shiny
application. Ideally, I would have liked to have the prerendered tables simply dumped into the rmarkdown
script... but I switched tactic and now try to render the tables directly in the rmarkdown
code)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…