subgraph: Subgraph

Description Usage Arguments

View source: R/subgraph.R

Description

This function outputs a subgraph of a graph by either removing nodes or edges.

Usage

1
2
subgraph(graph, nodes = NULL, from = NULL, to = NULL,
  type = c("nodes", "edges", "clique"))

Arguments

graph

A graph that is stored in an adjacency matrix.

nodes

A set of nodes to be removed. Default is the empty set.

from

A set of nodes that correspond to one side of the end nodes of the edges that will be removed. Default is the empty set.

to

A set of nodes that correspond to the other side of the end nodes of the edges that will be removed. Default is the empty set.

type

An argument to specify removing either nodes or edges from the original graph. Only three strings are taken. That is, "nodes", "edges" or "cliques".


kelvinyangli/wrsgraph documentation built on Sept. 6, 2019, 10 a.m.