title: how can I suppress output from Sweave that is not suppressed by echo=FALSE?
body: <p>I am getting extraneous output in my .tex file that I can not suppress with &lt;> or sink(). Notably, the unwanted lines are not enclosed by ..{Schunk} or similar.</p>
  
  <p>This occurs for me when I use either DEoptim or rjags, although this is likely not limited to these functions.</p>
  
  <p><strong>example</strong> .Rnw file:</p>
  
  <pre><code>\documentclass[a4paper, 12]{article}
  begin{document}
  
  &lt;&lt;echo=FALSE&gt;&gt;=
  require(DEoptim) 
  Rosenbrock &lt;- function(x){ #example from DEoptim authors 
    x1 &lt;- x[1]
    x2 &lt;- x[2]
    100 * (x2 - x1 * x1)^2 + (1 - x1)^2
  }
  lower &lt;- c(-10,-10)
  upper &lt;- -lower
  set.seed(1234)
  DEoptim(Rosenbrock, lower, upper)
  
  @
  
  \end{document}
  </code></pre>
  
  <p><strong>What I want to happen</strong>
  The result that I would like is the tex file that would be produced if the output were suppressed, or equivalently, if the code chunk were removed from the .Rnw file:</p>
  
  <pre><code>\documentclass[a4paper, 12]{article}
  \usepackage{Sweave}
  \begin{document}
  
  \end{document}
  </code></pre>
  
  <p><strong>What Happens</strong>
  However, the resulting .tex file has output from the function:</p>
  
  <pre><code>\documentclass[a4paper, 12]{article}
  \usepackage{Sweave}
  \begin{document}
  
  Iteration: 1 bestvalit: 132.371451 bestmemit:   -1.851683    4.543355
  Iteration: 2 bestvalit: 8.620563 bestmemit:   -1.854371    3.369908
  ....few hundred lines of DEoptim output ....
  $member$storepop
  list()
  
  
  attr(,"class")
  [1] "DEoptim"
  \end{document}
  </code></pre>
  
  <p>Note that the output is not enclosed by \begin{Schunk} \end{Schunk}, so the $ signs confuse LaTeX and it won't compile.</p>