Learn R Programming

sna (version 0.3)

addisolates: Add Isolates to a Graph

Description

Adds n isolates to the adjacency matrix (or matrices) in dat.

Usage

addisolates(dat, n)

Arguments

dat
One or more adjacency matrices
n
The number of isolates to add

Value

  • The updated graph stack.

Details

If dat contains more than one adjacency matrix, the n isolates are added to each member of dat.

References

Butts, C.T., and Carley, K.M. (2001). ``Multivariate Methods for Inter-Structural Analysis.'' CASOS Working Paper, Carnegie Mellon University.

See Also

isolates

Examples

Run this code
g<-rgraph(10,5)		#Produce some random graphs

dim(g)			#Get the dimensions of g

g<-addisolates(g,2)	#Add 2 isolates to each graph in g

dim(g)			#Now examine g
g

Run the code above in your browser using DataLab