How to get dialog/message box working in executable R file

孤者浪人 提交于 2019-12-11 00:08:31

问题


I have an executable R file. All of the code works as expected, except for the function winDialog(), which works through RStudio, but not when the file is run through double clicking.

The code in question is this:

winDialog("ok", paste0("The checks have been completed in ", round(as.numeric(time.taken), digits = 2), " minutes."))

"time.taken" exists as a variable, so that's not the problem.

Is there a different function that would work?

Edit: My question is similar to this one: gWidgets GUI cannot display when called with R CMD BATCH Also similar to this one: https://thesquareplanet.com/blog/interactive-r-scripts/ Still not sure how to implement.

The difference is, I would like to know how I can set the Rexec file to automatically run interactively, instead of running it from the command line with an extra argument every time?

来源:https://stackoverflow.com/questions/45274613/how-to-get-dialog-message-box-working-in-executable-r-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!