count_complex_triangles function

count complex triangles

count complex triangles

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

count_complex_triangles(g, attr)

Arguments

  • g: igraph object.
  • attr: edge attribute name that encodes positive ("P"), negative ("N") and ambivalent ("A") ties.

Returns

counts for all complex triangle types

Examples

library(igraph) g <- make_full_graph(4) E(g)$type <- c("P", "N", "A", "A", "P", "N") count_complex_triangles(g, attr = "type")

See Also

signed_triangles

Author(s)

David Schoch