View source: R/signed_triangles.R
count_complex_triangles | R Documentation |
Counts the number of all possible signed triangles (+++),(++-), (+–) and (—)
count_complex_triangles(g, attr)
g |
igraph object. |
attr |
edge attribute name that encodes positive ("P"), negative ("N") and ambivalent ("A") ties. |
counts for all complex triangle types
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.