Description Usage Arguments Details Value Author(s) References See Also Examples

This function computes the component structure of the input network, and returns a vector whose *i*th entry is the size of the component to which *i* belongs. This is useful e.g. for studies of diffusion or similar applications.

1 2 | ```
component.size.byvertex(dat, connected = c("strong", "weak",
"unilateral", "recursive"))
``` |

`dat` |
one or more input graphs (for best performance, sna edgelists or network objects are suggested). |

`connected` |
a string selecting the connectedness definition to use; by default, |

Component sizes are here computed using `component.dist`

; see this function for additional information.

In an undirected graph, the size of *v*'s component represents the maximum number of nodes that can be reached by a diffusion process along the edges of the graph originating with node *v*; the expectation of component sizes by vertex (rather than the mean component size) is thus one measure of the maximum average diffusion potential of a graph. Because this quantity is monotone with respect to edge addition, it can be bounded using Bernoulli graphs (see Butts (2011)). In the directed case, multiple types of components are possible; see `component.dist`

for details.

A vector of length equal to the number of vertices in `dat`

, whose *i*th element is the number of vertices in the component to which the *i*th vertex belongs.

Carter T. Butts [email protected]

West, D.B. (1996). *Introduction to Graph Theory.* Upper Saddle River, N.J.: Prentice Hall.

Butts, C.T. (2011). “Bernoulli Bounds for General Random Graphs.” *Sociological Methodology*, 41, 299-345.

1 2 3 4 5 6 | ```
#Generate a random undirected graph
g<-rgraph(100,tprob=1.5/99,mode="graph",return.as.edgelist=TRUE)
#Get the component sizes for each vertex
cs<-component.size.byvertex(g)
cs
``` |

sna documentation built on May 30, 2017, 12:18 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.