Learn R Programming

signnet (version 1.0.5)

count_signed_triangles: count signed triangles

Description

Counts the number of all possible signed triangles (+++),(++-), (+--) and (---)

Usage

count_signed_triangles(g)

Value

counts for all 4 signed triangle types

Arguments

g

igraph object with a sign edge attribute.

Author

David Schoch

See Also

signed_triangles

Examples

Run this code
library(igraph)
g <- make_full_graph(4)
E(g)$sign <- c(-1, 1, 1, -1, -1, 1)
count_signed_triangles(g)

Run the code above in your browser using DataLab