I would like to transform some edge lists into adjacency matrix. However, I face various complications: My data set consists of 27 actors who may or may not have a tie (weighted between 1-5, and directed) over 3 moments in time.
This means, for instance, that for t=1, I have an edge list like this:
countryA,countryB,tie
AUH,GMY,2
AUH,RUS,1
AUH,UKG,4
BOL,PER,5
BRA,ARG,1
PAR,UKG,4
And for t=2, I have an edge list like this:
countryA,countryB,tie
ARG,AUH,1
AUH,UKG,4
BOL,PER,5
BRA,ARG,1
PAR,UKG,4
RUS,UKG,2
The problem is that for each period I would like to have a matrix of 27x27. This means that also all the actors which may not share a tie with anyone else are included for every period of time. Basically, I would like to have something like this for all 3 periods (note that, ideally, the commas are gone):
0 0 0 3 2 1 4
0 0 4 2 1 0 0
0 0 0 0 3 4 4
0 0 0 0 2 1 4
0 0 4 2 0 0 0
0 0 0 0 3 0 4
0 3 4 2 0 0 0
Of course I already checked various forum posts, help sites and the like. But I wasn't able to figure out how I should do this. I am frustrated.