title: R CMD BATCH Issue: Unexpected Input Error
body: <p>I am trying to run an R script using the following,</p>
  
  <pre><code>c:\Progra~1\R\R-2.13.1\bin\R CMD BATCH "test.R"
  </code></pre>
  
  <p>The file test.R contains</p>
  
  <pre><code>print ("Hello World")
  </code></pre>
  
  <p>However, I keep getting the following error. The above example is kept simple with just 1 line to make debugging easier.</p>
  
  <pre><code>R version 2.13.1 (2011-07-08)
  Copyright (C) 2011 The R Foundation for Statistical Computing
  ISBN 3-900051-07-0
  Platform: i386-pc-mingw32/i386 (32-bit)
  
  R is free software and comes with ABSOLUTELY NO WARRANTY.
  You are welcome to redistribute it under certain conditions.
  Type 'license()' or 'licence()' for distribution details.
  
  Natural language support but running in an English locale
  
  R is a collaborative project with many contributors.
  Type 'contributors()' for more information and
  'citation()' on how to cite R or R packages in publications.
  
  Type 'demo()' for some demos, 'help()' for on-line help, or
  'help.start()' for an HTML browser interface to help.
  Type 'q()' to quit R.
  
  &gt; pError: unexpected input in "print ("Hello World")
  "
  Execution halted
  </code></pre>
  
  <p>It works if I add a ; sign after print ("Hello World"), but if there are other lines in test.R those lines never get executed.</p>
  
  <p>Could you please advise.</p>