Degree.list {shp2graph} | R Documentation |
Degree (In-degree and Out-degree) of nodes
Description
A function that returns degrees of nodes from provided “nodelist” and “edgelist”; while in-degrees and out-degrees are returned if edges are directed).
Usage
Degree.list(nodelist, edgelist, Directed=F)
Arguments
nodelist |
A “nodelist” object |
edgelist |
An “edgelist” object |
Directed |
TRUE if edges are directed; FALSE, otherwise |
Value
Lists of different contents are returned for undirected and directed edges respectively: For undirected graph:
DegreeL |
An integer vector of degrees for each node in the given “nodelist” |
For directed type:
InDegreeL |
An integer vector of In-degrees for each node in the given “nodelist” |
OutDegreeL |
An integer vector of Out-degrees for each node in the given “nodelist” |
Note
This function returns differently for undirected and directed networks, where both In-degrees and Out-degrees are calculated for a directed network, and only degrees are returned for an undirected networks.
Author(s)
Binbin Lu binbinlu@whu.edu.cn