I am using R to align the relationships between almost 40,000 items. There are two types of relationships 0, -1. To give a simple example, the data is in the form like
a|b|0
a|c|1
a|d|0
b|a|0
b|c|0
b|d|1
and I wish to align them in the form of
a{
0: b,d
1: c
},
b{
0: a,c
1: d
}
to make it easier to search and see the relation between items. I'm not sure even it is possible, but I would really love a help from R experts.