【发布时间】:2021-12-02 10:33:31
【问题描述】:
当我添加以下行以将目录添加到闪亮文档时:
toc: true
toc_float: true
文档无法运行。没有它们它运行良好。我收到以下错误:
Error Scanner error: mapping values are not allowed in this context at line 5, column 8(第 5 行是toc: true)
我该如何解决这个问题?
我运行的代码:
---
title: "Untitled"
runtime: shiny
output:
html_document
toc: true
toc_float: true
---
### section 1
```{r, echo=FALSE}
sliderInput("slider", "Number of observations:", 1, 100, 50)
renderText({paste0(rep('blah', 100), collapse = '\n')})
```
### section 2
```{r, echo=FALSE}
renderPlot({hist(rnorm(500)[seq_len(input$slider)])})
```
【问题讨论】:
标签: r shiny r-markdown