Learn R Programming

signnet (version 1.0.5)

count_complex_triangles: count complex triangles

Description

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

Usage

count_complex_triangles(g, attr)

Value

counts for all complex triangle types

Arguments

g

igraph object.

attr

edge attribute name that encodes positive ("P"), negative ("N") and ambivalent ("A") ties.

Author

David Schoch

See Also

signed_triangles

Examples

Run this code
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