Inproper show when use geom_net in R
<p>Given a data frame as follow:</p>

<pre><code>v1     v2     v3     v4
Tom     A     Jim     B
Gary    A     Shirly  A
Shirly  B     Jack    B
Tom     A     Jack    B
...
</code></pre>

<p>v2 and v4 denote which group the name in v1 and v3 respectively belongs to. Tom belongs to group A and Jim belongs to group v4.
I'd like to plot a social network with <code>geom_net</code>, with lines linkage to two names if they are in the same row, for instance, <code>Tom</code> and <code>Jim</code>. And the size of edges should be proportional to the times they have been appeared in V3, i.e, the edge of <code>Jack</code> should be as twice big as <code>Jim</code> and <code>Shirly</code>.</p>

<p>I tried </p>

<pre><code>ggplot(df, aes(from_id = V1,to_id = V3)) +geom_net()
</code></pre>

<p>But a very bad result is given:
    <a href="https://i.stack.imgur.com/h5HQL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h5HQL.png" alt="enter image description here"></a> </p>

<p>And a warning is generated:</p>

<pre><code>In f(..., self = self) :
There are 35 nodes without node information:
#And the below are all the values in V1 and V3
Tom, Shirly, ....
Did you use all=T in merge?
</code></pre>

<p>I wonder how to show the result in a proper and good looking way with no x-axis or y-axis and the relationship among edges should be clearly shown. And the edges' color should represent the groups they belongs to. That means all names in the same group should have same color.</p>

<p>Hope to get your help! Thanks in advance!</p>