在 *every* 命令后播放 R/RStudio 蜂鸣声 [英] Make R/RStudio beep play after *every* command
本文介绍了在 *every* 命令后播放 R/RStudio 蜂鸣声的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题与在命令后发出 R 哔声.我知道我可以将 beep()
与我想运行的任何命令一起运行,但是有没有办法自动运行 beep()
(来自 beepr
包)或 system("say done")
(我在 Mac 上运行 RStudio)在 every 命令之后?
My question relates to making R beep after a command. I understand that I can run beep()
together with whatever command I want to run, but is there a way to automatically run beep()
(from beepr
package) or system("say done")
(I run RStudio on a Mac) after every command?
例如是否有我可以调整的 options()
设置,以便在解释器中输入每个命令后执行另一个命令,例如 beep()
?
e.g. is there a options()
setting I can tweak so that after entering every command in the interpreter another command like beep()
is executed?
推荐答案
您想要 addTaskCallback.
addTaskCallback(function(...) { system("say done"); TRUE }, name = "announce when done")
玩得开心!
这篇关于在 *every* 命令后播放 R/RStudio 蜂鸣声的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文