core_periphery_weighted: Core-Periphery for Weighted Networks

View source: R/core_periphery_weighted_function.R

core_periphery_weightedR Documentation

Core-Periphery for Weighted Networks

Description

This function implements rich club core-periphery algorithm (Ma & Mondragón, 2015) to identify members of the core and periphery in weighted networks

Usage

core_periphery_weighted(gs, type)

Arguments

gs

International Trade Network - igraph object. Note for networks not produced using ITNr there needs to be a vertex attribute "name" and edge attribute "weight"

type

directed/undirected

Value

List - 1.)igraph object with core-periphery results added as a node attribute. 2.) Dataframe of core-periphery results.

References

Ma A, Mondragón RJ (2015) Rich-Cores in Networks. PLoS ONE 10(3): e0119678. https://doi.org/10.1371/journal.pone.0119678

Examples

require(igraph)
##Create random International Trade Network (igraph object)
ITN<-erdos.renyi.game(50,0.05,directed = TRUE)

##Add edge weights
E(ITN)$weight<-runif(ecount(ITN), 0, 1)

##Add vertex names
V(ITN)$name<-1:vcount(ITN)

##Implement core-periphery algorithm
ITNcp<-core_periphery_weighted(ITN,"directed")

ITNr documentation built on March 31, 2023, 6:59 p.m.