2013-11-25 60 views
4

我有一個小問題之後,我不知道是什麼原因,但下面knitr代碼:Knitr EMPTYLINE 包括圖形

<<toto, echo=FALSE, comment=NA, results='asis'>>= 
    #Data 
    a<- c(1:100) 
    b<- c(100:200) 
    #Plot1 
    plot(a) 
    #Plot2 
    plot(b) 
@ 

產生這種乳膠代碼:

\includegraphics[width=\maxwidth]{figure/toto1} 
    (empty line here) 
\includegraphics[width=\maxwidth]{figure/toto2} 
    (empty line here) 

如何我可以刪除這條空行嗎?

回答

6

使用塊選項fig.show='hold'