title: Generate Random network models with specified number of edges in r
body: <p>I want to generate random networks and want to compare the network with my original network that has 16809 nodes and 173393 edges. So for comparing it with different netwok models i will have to generate network model with same number of edges. In the erdos.renyi model i can generate random graph with specifying number of edges. How to generate scale-free and small world networks with same number of edges using igraph library in r.</p>
  
  <p>My example script is as follows.</p>
  
  <pre><code>library(igraph)
  g_erdos_renyi &lt;- erdos.renyi.game(16809, 173393 , type = "gnm" , directed = F , loops = F)
  g_scale &lt;- barabasi.game(16809 , m = 10)
  g_small &lt;- watts.strogatz.game(1, 16809, 10, 0.05)
  </code></pre>
  
  <p>How to generate random networks g_scale and g_small with 173393 number of edges..??</p>