在\ include图形后的Knitr空行

Hed*_*our 4 latex r knitr

我有一个小问题,我不确定原因,但以下针织代码:

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

生成这个LaTeX代码:

\includegraphics[width=\maxwidth]{figure/toto1}
  (empty line here)
\includegraphics[width=\maxwidth]{figure/toto2}
  (empty line here)
Run Code Online (Sandbox Code Playgroud)

如何删除此空行?

Yih*_*Xie 6

使用块选项fig.show='hold'.