将两个代码块链接在一起,以便它们的输出出现在降价中的同一类别下
Linking two code blocks together so that their output appears under the same category in the markdown
我有几个图表显示了两个相关的数据集。我想让它们出现在同一个 'category' 的 markdown 中,但是在两个单独的 'subtitles' 的 table 目录下。
我的 YAML 遵循这种模式(尽管我之前也使用过“toc:true”和“toc_float: true”):
---
title: "Update"
author: "Me"
date: "`r Sys.Date()`"
output:
rmdformats::readthedown:
fig_width: 12
fig_height: 5
---
我用来在降价中生成图表的代码遵循以下格式:
# Time-series
## Nominal
```{r chart1,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
Chart1
```
## Real
```{r chart2,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
Chart2
```
'category title'(时间序列)和 'subtitle'(标称)按预期工作,并在降价时出现 linked 在内容的 table 中生产的。第二个 'subtitle' (Real) 出现未 linked,虽然它似乎认识到 'Real' 旨在成为 RStudio 中的字幕,但当降价 html 产生时它既不识别为字幕,也不将其 link 识别为上面的 'category title'。有人知道如何实现吗?
您在 chunk1
和 ## Real
之间缺少一个空行
---
title: "Untitled"
author: "domingo"
date: "11 2 2022"
output:
html_document:
toc: TRUE
toc_float: TRUE
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Time-series
## Nominal
```{r chart1,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
plot(mtcars)
```
## Real
```{r chart2,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
plot(mtcars)
```
我有几个图表显示了两个相关的数据集。我想让它们出现在同一个 'category' 的 markdown 中,但是在两个单独的 'subtitles' 的 table 目录下。
我的 YAML 遵循这种模式(尽管我之前也使用过“toc:true”和“toc_float: true”):
---
title: "Update"
author: "Me"
date: "`r Sys.Date()`"
output:
rmdformats::readthedown:
fig_width: 12
fig_height: 5
---
我用来在降价中生成图表的代码遵循以下格式:
# Time-series
## Nominal
```{r chart1,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
Chart1
```
## Real
```{r chart2,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
Chart2
```
'category title'(时间序列)和 'subtitle'(标称)按预期工作,并在降价时出现 linked 在内容的 table 中生产的。第二个 'subtitle' (Real) 出现未 linked,虽然它似乎认识到 'Real' 旨在成为 RStudio 中的字幕,但当降价 html 产生时它既不识别为字幕,也不将其 link 识别为上面的 'category title'。有人知道如何实现吗?
您在 chunk1
和 ## Real
---
title: "Untitled"
author: "domingo"
date: "11 2 2022"
output:
html_document:
toc: TRUE
toc_float: TRUE
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Time-series
## Nominal
```{r chart1,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
plot(mtcars)
```
## Real
```{r chart2,echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE, fig.height=25,fig.width=10}
plot(mtcars)
```