Nevo
Nevo

Reputation: 952

R Studio: print output when running interactively but not when knitting

I have a long loop in an rmd notebook. For testing, I've put debug print statements every 1,000 iterations so I can see the loop progress.

I'd like to keep that debug output there while I'm doing my design/testing/debugging but omit that output when knitting my notebook. Is there an easy way to do that?

Upvotes: 0

Views: 76

Answers (1)

DanY
DanY

Reputation: 6073

Use results="hide" as a chunk option, as in:

```{r results="hide"}
   # r code
```

Upvotes: 1

Related Questions