title: How can I keep or make a new network from top 5% weighted edges?
body: <p>I am trying to reduce a large network to only the top 5% of its edges, determined by edge weight.  </p>
  
  <p>I usually trim my networks by declaring a cut-off point for edge weight like so:</p>
  
  <pre><code>g2 &lt;- delete.edges(g1, E(g1) [weight&lt;20])
  </code></pre>
  
  <p>Is there a way to delete the lower 95% of the edges according to weight, something like:</p>
  
  <pre><code>g2 &lt;- delete.edges(g1, E(g1) [weight outside the top 5%])
  </code></pre>
  
  <p>Or to extract the top 5% otherwise?</p>