I want to create a matrix (11 row and 2 columns) based on igraph formulas. It's not working
bin_node_size<-vcount(g) #network size (number of nodes)
wei_node_str<-graph.strength(g) #node strenght of each vertex
bin_node_deg<-degree(g) #node degree for each vertex
node_matrix<-as.matrix(c(wei_node_str, bin_node_deg), row=bin_node_size, col=2)
Here are the outputs of the formulas above
bin_nodesize
[1] 11
wei_node_str
A B C G D E F K H I J
19 3 5 5 5 9 3 4 1 3 3
bin_node_deg
A B C G D E F K H I J
6 2 2 2 1 3 1 2 1 1 1
1) I have 11 nodes , but I don't want to write "11" under row=11, I want to use the node degree to determiner the number of rows in my matrix.
2) in the event I replace row=row=bin_node_size for row=11, I end up with a matrix of 1 column instead of 2 ? even if the command as.matrix specifies to get 2 columns.