leaves
Find the leaves of a graph
A leaf of an undirected graph is a node with degree equal to one. A leaf of a directed graph is defined with respect to indegree or outdegree. The leaves of a directed graph with respect to indegree (outdegree) are those nodes with indegree (outdegree) equal to zero.
Usage
leaves(object, degree.dir)
Arguments
 object
 A
graph
object  degree.dir
 One of
"in"
or"out"
. This argument is ignored whenobject
is undirected and required otherwise. Whendegree.dir="in"
(degree.dir="out"
), nodes have no in coming (out going) edges will be returned.
Value

A character vector giving the node labels of the leaves.
Examples
data(graphExamples)
graphExamples[[1]]
leaves(graphExamples[[1]])
data(apopGraph)
leaves(apopGraph, "in")
leaves(apopGraph, "out")
Community examples
Looks like there are no examples yet.