MessageBox in R

蓝咒 提交于 2019-12-11 04:39:14

问题


I would like to create a messagebox using R. A short research suggested the tcltk package. The tcltk::tk_messageBox() command actually worked the first time I tried it.

However, I then I updated to Windows 10, switched to R 3.4.3, using RStudio v1.1.423. Now the same command does not work, actually terminating the R Session. A second research showed that this is indeed an issue other users have experienced as well.

So, here is my question: Is there either a way to resolve the compatibility issue of the tcltk library and R/RStudio? Alternatively, is there another package that could produce the same result? (I would like to avoid going as far as shiny, that has been suggested)


回答1:


With Windows 7, R 3.4.3 and RStudio 1.1.423 I have a similar problem, it looks like RStudio hangs, but in fact, the message-box has popped up, just that it does not become the active window and I have to minimize RStudio to see it.

The command I am running is:

tcltk::tk_messageBox(caption = "Hi", message = "what?", icon = "info", type = "yesno")


来源:https://stackoverflow.com/questions/49008964/messagebox-in-r

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