I have a dataframe in R similar to the following:
INSTITUTION GROUP
University1 Group1
University1 Group1
University3 Group2
University4 Group2
University1 Group2
University3 Group3
My intent is to create an edgelist to create a network in igraph of all the possible connections between institutions within their respective groups. The idea is that relationships wouldn't repeat. It would look something like this (I assume):
EDGE1 EDGE2
University1 University1 # for group 1
University3 University4 # for group 2
University3 University1 # for group 2
University4 University1 # for group 2
# and I assume that group 3 would not have an edge represented because it is alone.
I have been trying to figure out how to do this with igraph or with tidyverse and I am not sure how to go about it, as I always end up with repeated pairs or elements like Univerisity3 from group3 that I don't need.
Bonus question!
Once I have my edgelist set up, how can I limit the number edges shown in the network graph? For example, I would like to eliminate all edges that appear less than 10 times. The actual dataset is quite large and has many institutions.
Thank you so much!