Search code examples
rlatexknitrsweave

knitr showing R Chunk Code output after whole block of R Chunk Code


I wonder how to show the R Chunk Code output after whole block of R Chunk Code not the output after each code line.

\documentclass{article} 
\begin{document}

<< Test >>=
1:10
args(lm)
@ 
\end{document}

Solution

  • Are you writing in Rmarkdown ?? If so, there is an option you can add in R chunk like

    ```{r,results = "hold"}
    
    your R code
    
    ```
    

    Otherwise you should figure out how to give this argument to knitr while converting.