R, knitr doesn't respect order of chunks and text
问题 Imagine I knit this Rnw file: \documentclass{article} \begin{document} Table1 <<example,results='asis', echo=FALSE>>= require(xtable) nn <- 15 mydata <- data.frame(A=1:nn,C=nn:1, C=runif(nn), D=rnorm(nn)) xtable(mydata, caption="Table1") @ Table2 <<example2,results='asis', echo=FALSE>>= xtable(mydata, caption="Table2") @ Table3 <<example3,results='asis', echo=FALSE>>= xtable(mydata, caption="Table3") @ \begin{obeylines} Just some text \end{obeylines} \end{document} It's a simple example that