rmarkdown 评论或类似的东西

rmarkdown comments or something similar

rmarkdown文件编的时候,标题区后面有东西,如图。

如何删除那些?

我在 r 代码块中设置了 "warning=FALSE, comment=NA",但它不起作用。

部分代码如下:

---
title: 'Validness Report by All Facilities'
subtitle: '2017-01-03 to 2017-01-09'
output: pdf_document
geometry: margin=0.5in
classoption: landscape
documentclass: article
---


```{r input, echo = FALSE, results = 'hide', cache = TRUE, 
warning=FALSE, comment=FALSE, error=FALSE}

setwd("F:/")
dfDataIn_valid2 <- read.csv("full_valid.csv", stringsAsFactors = FALSE)
```


```{r validness, echo = FALSE, results = 'hide', 
cache = TRUE, warning=FALSE, comment=FALSE, error=FALSE}



# Check if required packages are installed. If not, install them.

packages <- c("rJava", "xlsxjars", "xlsx", "lubridate", "dplyr", "lazyeval")
lapply(packages, library, character.only = TRUE)

```

您需要将块选项 message 设置为 FALSE

```{r, echo = FALSE, results = 'hide', cache = TRUE, warning=FALSE, comment=FALSE, error=FALSE, message=FALSE)}

此外,您不需要为每个块重复选项;您也可以将它们设置在第一个中:

```{r}
library(knitr)
opts_chunk$set(echo = FALSE, results = 'hide', cache = TRUE, warning=FALSE, comment=FALSE, error=FALSE, message=FALSE)
```