Is there a way to embed a fully contained html table into xaringan slides?

188 Views Asked by At

I am trying to embed an html table produced using kable. The code producing the table takes a while to run, so I don't want to include it in my xaringan slides. Using xfun::file_string() to read a saved txt file removes the formatting of the table. Is there a way to embed a saved and self-contained table into the slides?

Thanks!

1

There are 1 best solutions below

0
On

You may use the chunk option results='asis':

```{r, results='asis', echo=FALSE}
xfun::file_string('your-table.html')
```