retain.groups {QPress}R Documentation

Edge Subsets

Description

Subset an edge list

Usage

retain.groups(edges, groups)

retain.nodes(edges, nodes)

Arguments

edges

an edge list

groups

the groups to retain in the subset

nodes

the nodes to retain in the subset

Details

These functions extract a subset of an edge list containing only edges in a specified group, or incident with a specified set of nodes.

Value

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.

Examples

edges <- parse.digraph(c("A *-> B","B *-> C","C *--> D"))
write.digraph(retain.groups(edges,c(0)))

[Package QPress version 0.21 Index]