title: Running R Code from Command Line (Windows)
body: <p>I have some R code inside a file called analyse.r. I would like to be able to, from the command line (CMD), run the code in that file without having to pass through the R terminal and I would also like to be able to pass parameters and use those parameters in my code, something like the following pseudocode:</p>
  
  <pre><code>C:\&gt;(execute r script) analyse.r C:\file.txt
  </code></pre>
  
  <p>and this would execute the script and pass "C:\file.txt" as a parameter to the script and then it could use it to do some further processing on it.</p>
  
  <p>How do I accomplish this?</p>