Degree.list: Degree (In-degree and Out-degree) of nodes

Description Usage Arguments Value Note Author(s)

View source: R/optimization.r

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

1

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 lubinbin220@gmail.com


shp2graph documentation built on May 1, 2019, 9:45 p.m.