title: I want to run a R code in batch and wait for user input
body: <p>I want to run a program in batch and I want it to wait for the user input in the program.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>library('XLConnect')
  FolderPath&lt;-"C:/Documents/Testing/"
  load(paste('C:/Documents/Testing/Program.ml',sep=''));Run()
  </code></pre>
  
  <p>This code is named Test.R, and it calls a compiled file that runs a function that does what I need. I need to have some inputs in this exercise, so I wanted to ask for the user to input some dates.</p>
  
  <p>The program should do something like this:</p>
  
  <pre><code>What are the years for this simulation?
  </code></pre>
  
  <p>Then the user enter:</p>
  
  <pre><code>&gt;2001, 2002, 2003, 2004
  </code></pre>
  
  <p>The program will save this vector in variable, lets call y.<br>
  Then, when I load the compiled function, I will use y.<br>
  The problem is that I run this R code in cmd batch.    </p>