I'm trying to create dynamically create tabbed output of skim()
results in a R
Notebook, but the output format comes out all funky.
I'm using the asis
results option and this works well when I'm publishing plots. When I tried this code for skim()
```{r eval=TRUE, results='asis', echo=FALSE}
cat("# Main Tab {.tabset}")
cat('\n\n')
cat('## Subtab 1')
cat('\n\n')
iris %>% skim()
```
The Headers and tabs look right, but the output format is off.
I've tried to remove the asis
in the chunk options and use knitr::asis_output()
for the headers, but then the headers don't get tabbed correctly.
Converting the skim()
results into a table via kable()
also doesn't have a great format either when you knit to a notebook.
Eventually, I want to loop through a list of dataframes and skim each one. How can I create the same look as the skim()
output format in each tab for this output?
thanks!