graph.nodes: Return root, end, or branchpoints of an igraph object

Description Usage Arguments Details See Also Examples

View source: R/graph-nodes.R

Description

Return root, end, or branchpoints of an igraph object

Usage

1
2
graph.nodes(x, type = c("root", "end", "branch"), original.ids = "name",
  exclude.isolated = TRUE)

Arguments

x

An igraph (or ngraph) object

type

one of root, end (which includes root) or branch

original.ids

Use named attribute to return original vertex ids (when available). Set to FALSE when this is not desired.

exclude.isolated

Do not count isolated vertices as root points (default)

Details

This function underlies rootpoints.igraph methods and friends. It is conceived of as slightly lower level and end users would normally use the rootpoints methods.

graph.nodes should work for any igraph object (including ngraph objects, which inherit from igraph). However the graph must be directed in order to return a root point

See Also

rootpoints, ngraph

Examples

1
2
3
4
5
ng=as.ngraph(Cell07PNs[[1]])
# arbitrary vertex identifiers
graph.nodes(ng, type = 'end')
# raw vertex indices
graph.nodes(ng,type = 'end', original.ids = FALSE)

jefferis/nat documentation built on Aug. 26, 2018, 12:13 p.m.