I am working with network adjacency matrices in R for a QAP regression. Currently, the matrices look like this (ignore 0s and 1s):
How can I make the column/row labels appear in the same order between time 1 and 2? I have sorted the initial edgelists (q1 and q2 in the code below), but something appears to get lost in translation when converting these to one mode adjacency matrices.
q1_2001<-graph.data.frame(q1, directed=FALSE)
q2_2002<-graph.data.frame(q2, directed=FALSE)
V(q1_2001)$type <- bipartite_mapping(q1_2001)$type
V(q2_2002)$type <- bipartite_mapping(q2_2002)$type
q1bp_2001<-bipartite.projection(q1_2001)
q2bp_2002<-bipartite.projection(q2_2002)
q1edge2001<-as_edgelist(q1bp_2001$proj1)
q1edge2002<-as_edgelist(q2bp_2002$proj1)
##Predictor Matrix (IV)
qap2001A<-get.adjacency(graph.data.frame(q1edge2001),sparse = FALSE)
qap2001A[order(decreasing = TRUE)]
##Response Matrix (DV)
qap2002B<-get.adjacency(graph.data.frame(q1edge2002),sparse = FALSE)