2017-03-04 86 views
0

enter image description herermarkdown意見或類似

當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) 

``` 
+0

請發佈生成該代碼的代碼。 –

+0

是的,我附上他們的關鍵部分。我認爲其餘的代碼不會影響這個輸出。 – Bin

回答

0

你需要大塊選項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) 
```