I have the following data:
ID=c(rep("ID1",3), rep("ID2",2), "ID3", rep("ID4",2)) item=c("a","b","c","a","c","a","b","a") data.frame(ID,item) ID1 a ID1 b ID1 c ID2 a ID2 c ID3 a ID4 b ID4 a
and I need this as a list of edges like this:
a;b b;c a;c a;c b;a
the first three edges coming from ID1, the fourth from ID2, ID3 have no boundaries, so none of this and the fifth from ID4. Any ideas on how to do this? melt / cast?
source share