我正在运行一个非常漫长的过程,如果有一种方法可以在完成后将R转到呼叫,电子邮件或发送给我,那就太棒了.有没有办法设置一个R-email脚本,以便在程序终止时运行,或者可能使用IFTTT向我发送短信或呼叫,以防我正在睡觉.
我正在使用RStudio作为我的IDE,所以也许那里有这样的功能.
如果有办法跟踪进展情况也不错,但不是100%要求
从这篇文章:
http://alicebrawley.com/getting-r-to-notify-you-when-its-finished/
我的一般解决方案是结合由Lin Himmelmann编写的R包邮件和IFTTT(If This,Then That)配方的变体.我使用邮件使用R中的功能发送电子邮件,然后IFTTT立即通知我该特定电子邮件.
安装完邮件后,请使用以下功能在代码完成后向自己发送电子邮件.
#Have R email you when it's done running.
###Calculating - your wish is R's command.
library(mail)
#Send yourself an email - specify your preferred email address, subject, and message. The password is fixed at "rmail".
sendmail("xxxxx@xxxxx.com", subject="Notification from R", message="Conditions finished running!", password="rmail")
Run Code Online (Sandbox Code Playgroud)
然后,您可以使用电子邮件触发的IFTT.
如果你在电脑旁边睡觉,还要考虑: 有没有办法让R在手写结束时发出嘟嘟声/播放声音?