【发布时间】:2021-03-18 19:35:22
【问题描述】:
有什么方法可以让我在 R 中只使用 yaml 而不是其他所有内容打开 Rmd 文件?
我想要这个...
---
title: "Untitled"
author: ""
date: ""
output: html_document
---
而不是...
---
title: "Untitled"
author: ""
date: ""
output: html_document
---
{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
包括地块
您还可以嵌入绘图,例如:
plot(pressure)
请注意,echo = FALSE 参数已添加到代码块中,以防止打印生成绘图的 R 代码。
【问题讨论】:
-
这样做的目的是什么?目前还不是很清楚您要达到的目标
-
@Bulat 没有什么特别的原因,只是在打开新的 rmd 文件时不得不删除代码有点烦人。
-
知道了,确实很烦人。我明白你现在想要达到的目标)
标签: r