powered by
Counts the number of all possible signed triangles (+++),(++-), (+--) and (---)
count_complex_triangles(g, attr)
counts for all complex triangle types
igraph object.
edge attribute name that encodes positive ("P"), negative ("N") and ambivalent ("A") ties.
David Schoch
signed_triangles
library(igraph) g <- make_full_graph(4) E(g)$type <- c("P", "N", "A", "A", "P", "N") count_complex_triangles(g, attr = "type")
Run the code above in your browser using DataLab