title: How to remove comments from R (Rstudio) output?
body: <p>I would like that R comments appear on the script file but not on the console.</p>
  
  <pre><code>1 + 1 # just a comment
  </code></pre>
  
  <p>Produces this:</p>
  
  <pre><code>&gt; 1 + 1 # just a comment   
  [1] 2
  </code></pre>
  
  <p>But I would like to get just</p>
  
  <pre><code>&gt; 1 + 1 
  [1] 2
  </code></pre>
  
  <p>Where can I modify the settings to get what I want?   </p>
  
  <p>The reason is because sometimes I use long comments and they confuse the output.</p>
  
  <p>PD: My question is not related with knitr nor markdown, it's just a general R and Rstudio question.</p>