View source: R/ITNcentrality_function.R
ITNcentrality | R Documentation |
This function calculates a number of centrality metrics for the weighted International Trade Network (ITN)
ITNcentrality(gs)
gs |
International Trade Network - igraph object |
Table of centrality results (dataframe)
require(igraph)
##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)
##Add vertex names
V(ITN)$name<-1:vcount(ITN)
##Calculate the centrality measures
ITNCENT<-ITNcentrality(ITN)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.