retain.groups | R Documentation |
Subset an edge list
retain.groups(edges, groups) retain.nodes(edges, nodes)
edges |
an edge list |
groups |
the groups to retain in the subset |
nodes |
the nodes to retain in the subset |
These functions extract a subset of an edge list containing only edges in a specified group, or incident with a specified set of nodes.
retain.groups
returns an edge list containing only edges from
the specified groups.
retain.nodes
returns an edge list containing only edges
incident on the specified nodes.
edges <- parse.digraph(c("A *-> B","B *-> C","C *--> D")) write.digraph(retain.groups(edges,c(0)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.