如何抑制 RStudio 中的输出? [英] How to suppress output in RStudio?

查看:94
本文介绍了如何抑制 RStudio 中的输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 RStudio 中运行我的 R 脚本时,我需要抑制我的输出.我的脚本中有很多注释,运行文件时会打印注释.

我意识到其他人已经问过如何从命令提示符执行此操作 -

I need to suppress my output when I run my R scripts in RStudio. There are a lot of comments in my scripts, and the comments are printed when I run the file.

I realize that others have asked how to do this from the command prompt - How to suppress output. I'm not interested in that.

I just want to know how to suppress the output in RStudio. The only exception to this should be print statements. Thanks in advance.

解决方案

Use source instead of source with echo in R Studio.

Same in MAC.

这篇关于如何抑制 RStudio 中的输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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