Numeric vector, the vertices of the original
graph which will form the subgraph.
impl
Character scalar, to choose between two
implementation of the subgraph
calculation. copy_and_delete copies the graph
first, and then deletes the vertices and edges that are not
included in the result graph. <
eids
The edge ids of the edges that will be kept in the
result graph.
delete.vertices
Logical scalar, whether to remove vertices
that do not have any adjacent edges in eids.
Value
A new graph object.
concept
Subgraph
Details
induced.subgraph calculates the induced subgraph of a set of
vertices in a graph. This means that exactly the specified vertices
and all the edges between then will be kept in the result graph.
subgraph.edges calculates the subgraph of a graph. For this
function one can specify the vertices and edges to keep. This
function will be renamed to subgraph in the next major
version of igraph.
The subgraph function does the same as induced.graph
currently (assuming auto as the impl
argument), but it is deprecated and will be removed in the next
major version of igraph.