<p>The easiest way to do it is through the <code>resolution</code> package, available in this link <a href="https://github.com/analyxcompany/resolution" rel="nofollow noreferrer">https://github.com/analyxcompany/resolution</a></p>

<p>It is based on this paper <a href="http://arxiv.org/pdf/0812.1770.pdf" rel="nofollow noreferrer">http://arxiv.org/pdf/0812.1770.pdf</a></p>

<p>It pretty much has 2 functions <code>cluster_resolution()</code> and <code>cluster_resolution_RandomOrderFULL()</code>.
In both you can state the resolution <code>t</code> and how many repetitions you want <code>rep</code>. And, you can just use the igraph object in the function.</p>

<pre><code>cluster_resolution_RandomOrderFULL(g,t=0.5)
cluster_resolution_RandomOrderFULL(g,rep=20)
</code></pre>

<p>NOTE/EDIT: it will not accept signed networks though! I'm trying to either contact the owner of the code or costumize it myself to make it suitable for signed networks.</p>

<p>EDIT2: I was able to translate the function community_louvain.m from the <a href="https://sites.google.com/site/bctnet/Home/functions" rel="nofollow noreferrer">Brain Connectivity Toolbox</a> for Matlab to R.</p>

<p>Here is the <a href="https://github.com/coelhocao/Brain_Network_analysis/blob/master/signed_louvain.R" rel="nofollow noreferrer">github link</a> for the <code>signed_louvain()</code></p>

<p>you can pretty much just put for ex. <code>signed_louvain(g, gamma = 1, mod = 'modularity')</code>
it works with igraph or matrix objects as input. If it has negative values, you have to choose <code>mod = 'neg_sym'</code> or <code>'neg_asym'</code>. </p>
How to set the resolution parameter for Louvain modularity in igraph?
<p>is there a way to set the resolution parameter when using the function <em>cluster_louvain</em> to detect communities in <em>igraph</em> for R? It makes a lot of difference for the result, as this parameter is related to the hierarchical dissimilarity between nodes. Thank you.</p>