File: triad_census.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (58 lines) | stat: -rw-r--r-- 2,122 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/motifs.R
\name{triad_census}
\alias{triad_census}
\title{Triad census, subgraphs with three vertices}
\usage{
triad_census(graph)
}
\arguments{
\item{graph}{The input graph, it should be directed. An undirected graph
results a warning, and undefined results.}
}
\value{
A numeric vector, the subgraph counts, in the order given in the
above description.
}
\description{
This function counts the different induced subgraphs of three vertices in
a graph.
}
\details{
Triad census was defined by David and Leinhardt (see References below).
Every triple of vertices (A, B, C) are classified into the 16 possible
states: \describe{ \item{003}{A,B,C, the empty graph.} \item{012}{A->B, C,
the graph with a single directed edge.} \item{102}{A<->B, C, the graph with
a mutual connection between two vertices.} \item{021D}{A<-B->C, the
out-star.} \item{021U}{A->B<-C, the in-star.} \item{021C}{A->B->C, directed
line.} \item{111D}{A<->B<-C.} \item{111U}{A<->B->C.} \item{030T}{A->B<-C,
A->C.} \item{030C}{A<-B<-C, A->C.} \item{201}{A<->B<->C.}
\item{120D}{A<-B->C, A<->C.} \item{120U}{A->B<-C, A<->C.}
\item{120C}{A->B->C, A<->C.} \item{210}{A->B<->C, A<->C.}
\item{300}{A<->B<->C, A<->C, the complete graph.} }

This functions uses the RANDESU motif finder algorithm to find and count the
subgraphs, see \code{\link[=motifs]{motifs()}}.
}
\examples{

g <- sample_gnm(15, 45, directed = TRUE)
triad_census(g)
}
\references{
See also Davis, J.A. and Leinhardt, S.  (1972).  The Structure
of Positive Interpersonal Relations in Small Groups.  In J. Berger (Ed.),
Sociological Theories in Progress, Volume 2, 218-251.  Boston: Houghton
Mifflin.
}
\seealso{
\code{\link[=dyad_census]{dyad_census()}} for classifying binary relationships,
\code{\link[=motifs]{motifs()}} for the underlying implementation.
}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}
}
\concept{motifs}
\keyword{graphs}
\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-Motifs.html#igraph_triad_census}{\code{igraph_triad_census()}}.}