作为标题 - 我希望能够使用yocL标签,如toc:true和toc_float:true,以便在RNotebook文件中使用。目前我有这个:
标题:" R笔记本" 输出: html_notebook:
这是一款R Markdown笔记本。 w ^
{r}
plot(cars)
```
这给了我一个错误:yaml :: yaml.load(string,...)中的错误: 扫描程序错误:在第3行扫描下一个标记时,第1列找不到第3行第1列任何标记的字符
文档加载,但没有toc。
答案 0 :(得分:0)
试试rstudio basic
中的这个例子---
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(cars)
```
# 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).