How to suppress all messages in knitr / Rmarkdown?

I used dplyr for some analyzes, and for a specific code it takes about 30 seconds to complete the operation. In the resulting HTML, I get a very long output of something like this (reproducing the last few lines):

 |================================================ |100% ~0 s remaining |================================================ |100% ~0 s remaining Completed after 35 s 

I do not want this displayed on the output. How can I suppress this? Is there any point in global chunk options for knitr that could stop these posts.

+5
source share
2 answers

I think you need the option chunk results='hide' only for this particular piece of code.

 ```{r results='hide'} # do your dplyr computation here ``` 
+6
source

or do message = 'hide' or if you have a warning that you do waring = 'hide'.

It depends on what is displayed, but if you look at the chunk options in google, you can find which one will hide what you want to hide.

0
source

Source: https://habr.com/ru/post/1205059/


All Articles