Home Comments Thread
New Thread

4 Comments

giscus-bot giscus-bot 2022-12-17 01:59:28
Guest *Zhuoer Dong* @ 2018-09-22 09:34:56 originally posted:

If there an option to execute the code, show the R source code, but hide all kinds of output?

giscus-bot giscus-bot 2022-12-17 01:59:31
Guest *Zhuoer Dong* @ 2018-09-22 09:38:19 originally posted:

Currently, I use the method of reusing code chunk:

```{r chunk1, include=FALSE}
print('Hello Yihui')
```

```{r chunk1, eval=FALSE}
```
giscus-bot giscus-bot 2022-12-17 01:59:29
Guest *GM* @ 2019-01-10 01:00:29 originally posted:

Hello,

I'm sorry if this is the wrong place to ask, but is there a way to exclude whole sections of a R Markdown document from being knitted to a Word document? I mean the text outside of the chunks included in that section, too.

I've tried to find an answer but all the results I get are only about chunks, and not the text of the rest of the document.

Thanks in advance.

yihui yihui 2022-12-17 01:59:32

This is a really good question, but currently the answer is not straightforward. This is something I intend to work on in future: rstudio/rmarkdown#974 Before that, you have to use HTML comments and set knitr::opts_chunk$set(eval = FALSE) in the comments.

Originally posted on 2019-01-10 18:52:42

giscus-bot giscus-bot 2022-12-17 01:59:33
Guest *GM* @ 2019-01-12 14:32:59 originally posted:

Thank you very much for your quick response. I really hope this option gets implemented in the future, because it'd be incredibly useful for those cases when you are continually updating a statistical report and want to conserve the oldest parts but not saving them to the final document.

Thank you again for your contributions to R.

giscus-bot giscus-bot 2022-12-17 01:59:34
Guest *joyce_robbins* @ 2019-09-24 16:12:49 originally posted:

The asis engine is really helpful here. See this discussion: ropensci/unconf18#74

giscus-bot giscus-bot 2022-12-17 01:59:29
Guest *Quentin* @ 2019-07-18 20:42:40 originally posted:

Wow I can't believe I did not realize this until now! Lifesaver!

Sign in to join the discussion

Sign in with GitHub