| induce_subgraph | R Documentation |
Extract an induced temporal subgraph
induce_subgraph(dn, nodes = NULL, ties = NULL, keep_isolates = FALSE)
dn |
A temporal network. |
nodes |
Which vertices to keep. Either a condition on the vertex
table, evaluated the way |
ties |
Which ties to keep. Either a condition on the spell table,
evaluated the way |
keep_isolates |
Whether named nodes without a selected tie remain.
Default |
A new dynet object, class
c("dynet", "netobject", "cograph_network"), carrying only the selected
spells, the vertices they touch (plus any isolate named in nodes when
keep_isolates = TRUE), those vertices' activity spells, and all static
node and tie attributes. Metadata is rebuilt, so the observed range and
the canonical spell identifiers describe the subgraph, not the parent.
Raises dynet_unknown_node for a name that is not a vertex,
dynet_empty_network when the selection leaves no vertex or no tie, and
dynet_bad_input when neither nodes nor ties is supplied or a
selection is malformed.
dn <- dynet(school_contacts)
# A condition on the vertex table, in one call.
induce_subgraph(dn, degree > 16)
# Names still work, as does anything carrying them.
induce_subgraph(dn, nodes = c("Ana", "Ben", "Cara"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.