我正在教学生如何创建/编辑R标记文件。所以我希望在我的R markdown文件中有一个R markdown模板。示例如下:
---
title: "file_check"
author: "James"
date: "8/7/2020"
output: html_document
---
Learn by copying this into blank .Rmd file:
---
title: "Template"
author: "Your Name"
date: "Specify Date"
output: html_document
---
This is how you plot
```{r}绘图(1:10)
当我运行这个程序时,我显然会得到错误,但我知道必须有一种快速/有效的方法来做到这一点,因为R markdown网站具有这种功能。
发布于 2020-08-10 00:34:36
您可以使用text块:
---
title: "file_check"
author: "James"
date: "8/7/2020"
output: html_document
---
Learn by copying this into blank .Rmd file:
```{text}
---
title: "Template"
author: "Your Name"
date: "Specify Date"
output: html_document
---
```
This is how you plot
```{r}
plot(1:10)
```

https://stackoverflow.com/questions/63328652
复制相似问题