title: How to Assign screen results from a function to variables in R
body: <p>I'm new in R. I am using a Library called "CircStat". Functions in that library print the results on the screen, for example </p>
  
  <pre><code>rao.spacing(angles)
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>Rao's Spacing Test of Uniformity 
  
  Test Statistic = 155.9671 
  
  0.001 &lt; P-value &lt; 0.01
  </code></pre>
  
  <p>where "rao.spacing is the function, and "angles" is a list of several angles in rad.</p>
  
  <p>I need to pass the output, specifically, "155.9671" to a variable to use it in other parts of my code, How can I do that?</p>
  
  <p>I prefer to do NOT write to a file and read from that, because I need to use the function for more that 50,000. And printing would be very time consuming.</p>
  
  <p>Thanks,
  Moe</p>