作为标题-我希望能够在RNotebook文件中使用像toc: true和toc_float: true这样的YAML标记。目前,我有以下内容:
`
标题:"R Notebook“输出: html_notebook:
toc:true
第1节
这是一台R Markdown笔记本。W
第2节
{r} plot(cars) `
这给出了一个错误: error in yaml::yaml.load(string,...):Scanner :在扫描第3行第1列的下一个标记时发现无法开始第3行第1列的任何标记的字符
将加载文档,但没有toc。
发布于 2017-08-03 19:02:32
尝试rstudio基础示例中的这个示例
---
title: "R Notebook"
output:
html_notebook:
toc: yes
toc_float: yes
html_document:
toc: yes
---
# blabla section 1
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*.
```{r}plot(汽车)
# blabla section 2
Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Ctrl+Alt+I*.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Ctrl+Shift+K* to preview the HTML file).https://stackoverflow.com/questions/45480547
复制相似问题