title: Find largest 5 value less than 1, lowest 5 values
body: <p>I have a large correlation matrix result in R - for now about 30 items correlated against each other - so the array has about 10,000 cells. I want to find the largest 5 and smallest 5 results. How can I do this?</p>
  
  <p>Here's what a very small portion - the upper left corner - looks like:</p>
  
  <pre><code>               PL1         V3          V4         V5
  PL1     1.00000000 0.19905701 -0.02994034 -0.1533846
  V3      0.19905701 1.00000000  0.09036472  0.1306054
  V4     -0.02994034 0.09036472  1.00000000  0.1848030
  V5     -0.15338465 0.13060539  0.18480296  1.0000000
  </code></pre>
  
  <p>The values in the table are always between 1 &amp; -1 and if it helps, being a correlation matrix the upper half above the diagonal is a duplicate of the lower half below the diagonal.</p>
  
  <p>I need the most positive 5 less than 1 and the most negative 5 including -1 if it exists.</p>
  
  <p>Thanks in advance.</p>