title: R system functions always returns error 127
body: <p>I need to execute an  external tool from <strong><code>R</code></strong> and process errors (if any) occurred in that tool.
  I know 3 functions to do something familiar with my task: </p>
  
  <pre><code>shell, system and system2.
  </code></pre>
  
  <p>Trying to test those, I see that command </p>
  
  <pre><code>shell("notepad") 
  </code></pre>
  
  <p>opens notepad. As far as I know shell doesn't allow to check errors (there's no interface to look into <code>stderr</code>).</p>
  
  <p>When I call </p>
  
  <pre><code>system("notepad")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>system2("notepad") 
  </code></pre>
  
  <p><strong><code>R</code></strong> freezes trying to make those commands. </p>
  
  <p>Calling </p>
  
  <pre><code>system("start notepad") 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>system2("start notepad") 
  </code></pre>
  
  <p>returns warning </p>
  
  <pre><code>Warning message:
  running command '"start notepad"' had status 127 
  </code></pre>