updateGraphAttributes: Update vertices and attributes of a graph

Description Usage Arguments Value Examples

View source: R/rewiring.R

Description

First, different degrees (deg, indeg, outdeg) are computed and attached as vertices attributes. Then, given these degrees, vertice type (P, I, D) is deducted. Edges type is equal to the concatenation of ends vertices types.

Usage

1

Arguments

g

an igraph object; the supply network.

Value

an igraph object.

Examples

1
2
3
4
5
library(igraph)
g = make_tree(10)
g = updateGraphAttributes(g)
V(g)$type
E(g)$type

MiloMonnier/supplynet documentation built on Feb. 16, 2021, 8:03 p.m.