I would like to run an R script using a single command (e.g. bat file or shortcut).This R script asks the user to choose a file and then plots information about that file. All is done via dialog boxes.I don't want the user to go inside R - because they don't know it at all.So, I was using r cmd and other similar stuffs, but as soon as the plots are displayed, R exits and closes the plots.What can I do?Thanks for your help.
How to run R scripts without closing X11
r
This looks like a similar kind of a problem.Solutions: (taken from above source)Just sleep via  Sys.sleep(10) which would wait ten seconds.Wait for user input via readLines(stdin()) or something like that [untested]Use the tcltk package which comes with R and is available on all platforms to pop up a window the user has to click to make the click disappear. That solution has been posted a few times over the years on r-help.2nd option is better to use for the user.P.S. Since I did not come up with the answer myself, I tried to put it in comment but my reputation is too low for that.