mixing_matrix_igraph function

Mixing Matrix

Mixing Matrix

This function calculates the mixing matrix for an igraph object

mixing_matrix_igraph(gs, attrname)

Arguments

  • gs: igraph object.
  • attrname: Attribute name (vertex attribute)

Returns

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")
  • Maintainer: Matthew Smith
  • License: GPL-3
  • Last published: 2023-03-31

Useful links