I have a script which launches various gWidgets
windows with buttons that have functions attached. I'd like to be able to launch this with rscript.exe so others can use it without seeing R. My problem is that when I launch the script using rscript.exe myscript.r
an rscript instance shows up in task manager, it loads all the packages, the widget pops up for a second, and then it's gone (including the rscript process from task manager) before the user can even do anything. How can I make the instance of rscript
stay active until all the gWidgets
windows are closed? If I launch the script from either Rstudio or Rgui it stays open until done. As a similar question, is there also a way to prevent the dialog box showing the various commands from coming up too? I'm using Windows 7 by the way.
Asked
Active
Viewed 755 times
2

Dean MacGregor
- 11,847
- 9
- 34
- 72
-
See for example here http://stackoverflow.com/questions/15272916/how-to-wait-for-a-keypress-in-r/15283106#15283106 though you need to adapt for gWidgets. – Dirk Eddelbuettel Jun 06 '13 at 02:47