我正在尝试将2个dfSummary输出放入RMarkdown中的一个选项卡部分。我认为我必须使用结果= 'asis‘来生成图表,但是当我使用该选项时,选项卡功能就会中断。摘要不是出现在标签中,而是以行形式显示在文档中.
下面的示例位于ToothGrowth数据集上,并显示了我希望解决的问题。
---
title: "test"
output: html_document
---
```{r setup, include = FALSE}
图书馆(摘要工具)
st_options(plain.ascii = FALSE #)在所有Rmd文档中都非常方便
, style = "rmarkdown" # This too
, footnote = NA # Avoids footnotes which would clutter the results
, subtitle.emphasis = FALSE # This is a setting to experiment with - according to the theme used, it might improve the headings layout
)
Knitr::opts_chunk$set(结果= 'asis')
## R Markdown
### {.tabset .tabset-pills}
#### Numeric Variables
This section is for numeric variables.
```{r}
摘要工具::ToothGrowthc(‘len’,'dose'),style = "grid",graph.magnif = 0.75,valid.col = FALSE,tmp.img.dir = "/tmp")
#### Factor Variables
This section is for factor variables.
```{r}
摘要工具::ToothGrowthc(‘supp’),style = "grid",graph.magnif = 0.75,valid.col = FALSE,tmp.img.dir = "/tmp")
谢谢!
发布于 2020-09-19 05:09:32
我会尝试这两件事:
headings=FALSE
.这将防止##
与选项卡式内容内部的##
# {.tabset .tabset-pills}
以及## Numeric
& ## Factor
冲突。https://stackoverflow.com/questions/63903502
复制相似问题