mixing_matrix_igraph {ITNr} | R Documentation |
Mixing Matrix
Description
This function calculates the mixing matrix for an igraph object
Usage
mixing_matrix_igraph(gs, attrname)
Arguments
gs |
igraph object. |
attrname |
Attribute name (vertex attribute) |
Value
Mixing matrix
Examples
require(igraph)
##Create random International Trade Network (igraph object)
gs<-erdos.renyi.game(50,0.05,directed = TRUE)
##Add vertex attributes
V(gs)$LETTER<-rep(LETTERS[1:5],10)
##Add vertex names
V(gs)$name<-1:vcount(gs)
##Calculate mixing matrix
mixing_matrix<-mixing_matrix_igraph(gs,"LETTER")
[Package ITNr version 0.7.0 Index]