powered by
Adds n isolates to the graph (or graphs) in dat.
n
dat
add.isolates(dat, n, return.as.edgelist = FALSE)
The updated graph(s).
one or more input graphs.
the number of isolates to add.
logical; should the input graph be returned as an edgelist (rather than an adjacency matrix)?
Carter T. Butts buttsc@uci.edu
If dat contains more than one graph, the n isolates are added to each member of dat.
Butts, C.T., and Carley, K.M. (2001). ``Multivariate Methods for Inter-Structural Analysis.'' CASOS Working Paper, Carnegie Mellon University.
isolates
g<-rgraph(10,5) #Produce some random graphs dim(g) #Get the dimensions of g g<-add.isolates(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