0

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} 

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

It looks like those chunks come from Sweave.

I would suggest to first present only code, and then to present only results. This means you would have to double your chunks, but a copy of every chunk would have to have a different chunk option. Like this:

\documentclass{article} \begin{document} 

here are chunks that will generate only code

<< Test1, results='hide' >>= 1:10 args(lm) @ << Test2, results='hide' >>= 2:5 args(lm) @ 

and here are chunks that will generate only results

<< Test3, echo=FALSE >>= 1:10 args(lm) @ << Test4, echo=FALSE >>= 2:5 args(lm) @ \end{document} 

I wish I didn't make mistake with those chunk options name, cose Im rather familiar with knitr insead od sweave.

If you want to learn knitr visit webiste of this RNINJA

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.