Extract an Induced Subgraph
Value
A dgraph with compact indices and aligned lengths and attributes.
metadata$original.vertices maps its vertices back to the original graph.
Examples
graph <- create.graph("chain", 4)
sub <- create.subgraph(graph, vertices = c(4, 3))
graph.edges(sub)
#> from to length
#> 1 1 2 1
sub$metadata$original.vertices
#> [1] 4 3