add.isolates | R Documentation |

Adds `n`

isolates to the graph (or graphs) in `dat`

.

add.isolates(dat, n, return.as.edgelist = FALSE)

`dat` |
one or more input graphs. |

`n` |
the number of isolates to add. |

`return.as.edgelist` |
logical; should the input graph be returned as an edgelist (rather than an adjacency matrix)? |

If `dat`

contains more than one graph, the `n`

isolates are added to each member of `dat`

.

The updated graph(s).

Isolate addition is particularly useful when computing structural distances between graphs of different orders; see the above reference for details.

Carter T. Butts buttsc@uci.edu

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

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.