Get the in-degree and out-degree of nodes in an abstract graph
Source:R/abstract-graph.R
node_degrees.Rd
This function is only called nodes that have been check()
'd. It is
safe to assume that nodes
is non-empty.
Arguments
- graph
A graph object.
- nodes
The name(s) of node(s) in
graph
as a character vector. Methods may assume that there are no repeated values innodes
.
Value
A data.frame()
with one row for every node in nodes
and
two columns: in_degree
and out_degree
. In a symmetric graph,
in_degree
and out_degree
should match.