title: Suppress automatic output to console in R
body: <p>The function <code>callmultmoments</code> computes moments of the normal distribution.
  The function automatically prints <code>"Sum of powers is odd. Moment is 0."</code> if the sume of the powers is odd. Is there any way to supress that under the condition that the original function should stay untouched.</p>
  
  <p>Ex:</p>
  
  <pre><code>require(symmoments)
  # Compute the moment for the 4-dimensional moment c(1,1,3,4):
  
  m.1134 &lt;- callmultmoments(c(1,1,3,4))
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>As described <a href="https://stackoverflow.com/questions/2501895/how-to-suppress-output?noredirect=1&amp;lq=1">here</a> we can use</p>
  
  <pre><code>## Windows
  sink("nul") 
  ...
  sink()
  
  ## UNIX
  sink("/dev/null")    # now suppresses
  ....                 # do stuff
  sink()               # to undo prior suppression, back to normal now
  </code></pre>
  
  <p>However, I am writing a package so I want it to be platform independent. Any ideas what to do instead?</p>