I have a small shell script (bash) which runs a R script which produces a plot as output. Everything works fine but immedietly after the plot is rendered R quits. Is there a
You could add a loop that checks for the graphical device every n seconds:
while (!is.null(dev.list())) Sys.sleep(1)
This will sleep until you close the plot window.