View source: R/graph_metrics.R
constraint | R Documentation |
The igraph package provides an implementation of Constraint; this is an alternate implementation.
constraint(g, v = igraph::V(g))
g |
The igraph object to analyze. |
v |
vertices over which to compute constraint (default to all) |
A numeric vector with the constraint score for each vertex in v
ig.ex <- igraph::erdos.renyi.game(100, p.or.m=0.3) # generate an undirected 'igraph' object
constraint(ig.ex) # constraint scores for each node in the graph
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.