View source: R/ITNblock_plot_function.R
ITNblock_plot | R Documentation |
This function calculates block membership for the ITN and then plots the network, with node colour according to block membership.
ITNblock_plot(gs, LABEL)
gs |
International Trade Network - igraph object |
LABEL |
Should labels be present - TRUE/FALSE |
Network Plot - nodes coloured based on block membership
require(igraph)
require(sna)
require(intergraph)
##Create random International Trade Network (igraph object)
ITN<-erdos.renyi.game(75,0.05,directed = TRUE)
##Add edge weights
E(ITN)$weight<-runif(ecount(ITN), 0, 1)
##Blockmodel plot
block_plot<-ITNblock_plot(ITN,FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.