<p>If you're trying to do a graphletCount then the way to do it is within an 'ergm()' command, as follows:</p>

<pre><code>ergm(GY2~graphletCount(n))
</code></pre>

<p>n can be any number from 0 to 29 corresponding to the 30 possible graphlets that exist with up to 5 nodes. It's also possible to define a vector 'c(1,3,5)' to run the graphletCount. Be aware that n is an optional argument and can be left blank, which will run all 30 possible counts.</p>

<p>See the <a href="http://arxiv.org/pdf/1405.7348.pdf" rel="nofollow">paper on ergm.graphlets for examples</a></p>
InitErgmTerm.graphletCount in R
<p>I loaded my interaction data, converted to an adjacency matrix and then converted it to an undirected graph.</p>

<p>I installed the packages; <code>ergm</code>, <code>ergm.graphlets</code>, <code>statnet</code>, etc.</p>

<p>When I write:</p>

<pre><code>InitErgmTerm.graphletCount(GY2)
</code></pre>

<p>I get the following error message:</p>

<blockquote>
  <p>Error: is.directed(nw) :  is.directed requires an argument of <strong>class
  network</strong>.</p>
</blockquote>

<p>I couldn't find a solution in the tutorial, and I would really appreciate if someone clarifies this.</p>