crossing2 {smallstuff}R Documentation

Find Edge Crossings

Description

Determine if edges in a graph cross groups or stay within groups. This is similar to the crossings function in igraph, but uses a vector for the split rather than a communities object.

Usage

crossing2(split, g)

Arguments

split

a vector with a value for each vertex in g, indicating the group each vertex belongs to

g

an igraph object

Value

A logical vector indicating for each edge if it crosses groups or not. For each edge that crosses, it is TRUE, otherwise it is FALSE.

Examples

g=igraph::graph_from_literal(1-2,2-3:4,3-4:5:6,5-1)
split=c("A","A","B","B","A","B")
igraph::V(g);split
igraph::E(g);crossing2(split,g)

[Package smallstuff version 1.0.3 Index]