Learn R Programming

gMCP (version 0.8-17)

subgraph: Get a subgraph

Description

Given a set of nodes and a graph this function creates the subgraph containing only the specified nodes.

Usage

subgraph(graph, subset)

Value

A subgraph containing only the specified nodes.

Arguments

graph

A graph of class graphMCP.

subset

A logical or character vector specifying the nodes in the subgraph.

Author

Kornelius Rohmeyer rohmeyer@small-projects.de

See Also

graphMCP

Examples

Run this code


graph <- improvedParallelGatekeeping()
subgraph(graph, c(TRUE, FALSE, TRUE, FALSE))
subgraph(graph, c("H1", "H3"))


Run the code above in your browser using DataLab