I have a blogdown site based on the hugo-future-imperfect theme where a DT output is created correctly in the rmd but the data is not shown (although the headings are) when applying serve_site/build_site
I have created two brand new sites ( so with no other complications) to illustrate the issue. This is the code and outputs
```{r DT}
library(DT)
library(tidyverse)
iris %>%
datatable()
```
a) default theme
b) hugo-imperfect
You can use the package widgetframe
.
Install the package, then save your datatable in a variable.
install.packages("widgetframe")
ts <- iris %>% DT::datatable()
So when you want to display the datatable, just do it:
widgetframe::frameWidget(ts)
That works for me!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With