title: Make R (statistics package) wait for keyboard prompt when run within a bash script
body: <p>I am using R to generate a series of plots within a loop, with the user hitting the enter key to indicate they have seen the plot and it is time to move on.  These are interactive rotatable plots generated with the rgl package and therefore using something like Sys.sleep() is not good enough.</p>
  
  <p>Currently I can use readline() which works find when running R interactively.  However, if I want to run my R script within a bash script all the plots appear flashing before the screen.  This happens whether I call R using:</p>
  
  <pre><code>R --no-save -f myfile.r
  R --no-save -e "source('myfile.r')"
  R --no-save &lt;&lt; myfile.r
  </code></pre>
  
  <p>How do I get R to pause and wait for the user to hit  when run as a bash subprocess?</p>