Description Usage Arguments Value Author(s) See Also Examples

Find and remove unconnected vertices from the graph.

1 2 3 4 5 |

`graph` |
Any class of accepted graph format (see |

`undirected` |
Logical scalar. When |

`self` |
Logical scalar. When |

When `graph`

is an adjacency matrix:

`isolated` |
an matrix of size |

`drop_isolated` |
a modified graph excluding isolated vertices. |

Otherwise, when `graph`

is a list

`isolated` |
an matrix of size |

`drop_isolated` |
a modified graph excluding isolated vertices. |

George G. Vega Yon

Other data management functions: `diffnet-class`

,
`edgelist_to_adjmat`

,
`egonet_attrs`

,
`survey_to_diffnet`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
# Generating random graph
set.seed(123)
adjmat <- rgraph_er()
# Making nodes 1 and 4 isolated
adjmat[c(1,4),] <- 0
adjmat[,c(1,4)] <- 0
adjmat
# Finding isolated nodes
iso <- isolated(adjmat)
iso
# Removing isolated nodes
drop_isolated(adjmat)
# Now with a dynamic graph
graph <- rgraph_er(n=10, t=3)
# Making 1 and 5 isolated
graph <- lapply(graph, "[<-", i=c(1,5), j=1:10, value=0)
graph <- lapply(graph, "[<-", i=1:10, j=c(1,5), value=0)
graph
isolated(graph)
drop_isolated(graph)
``` |

srdyal/diffusiontest documentation built on July 31, 2018, 2:14 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.