如何隐藏knitr/Rmarkdown中的所有消息? [英] How to suppress all messages in knitr/ Rmarkdown?

查看:86
本文介绍了如何隐藏knitr/Rmarkdown中的所有消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用dplyr进行了一些分析,对于特定的代码,大约需要30秒才能完成操作.在生成的HTML中,我得到了很长的输出,如下所示(复制了最后几行):

I have used dplyr for some of the analyses and for a particular 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 last few lines):

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

我不希望它显示在输出中.我该如何抑制呢? knitr的全局块选项中是否有任何可以阻止这些消息的想法

I don't want this to show in the output. How can I suppress this? Is there anythink in the global chunk options of knitr that could stop these messages

推荐答案

我认为您只希望将块选项results='hide'用于该特定代码块.

I think you want the chunk option results='hide' for that particular code chunk only.

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

这篇关于如何隐藏knitr/Rmarkdown中的所有消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆