Learn R Programming

sna (version 0.41)

isolates: List the Isolates in a Graph or Graph Stack

Description

Returns a list of the isolates in the graph or graph stack given by dat.

Usage

isolates(dat, diag=FALSE)

Arguments

dat
A graph or graph stack
diag
Boolean indicating whether adjacency matrix diagonals (i.e., loops) contain meaningful data

Value

  • A vector containing the isolates, or a list of vectors if more than one graph was specified

References

Wasserman, S., and Faust, K. (1994). ``Social Network Analysis: Methods and Applications.'' Cambridge: Cambridge University Press.

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

See Also

is.isolate, addisolates

Examples

Run this code
#Generate a test graph
g<-rgraph(20)
g[,4]<-0          #Create an isolate
g[4,]<-0

#List the isolates
isolates(g)

Run the code above in your browser using DataLab