degree: Degree Centrality Computation

Description Usage Arguments Value Examples

View source: R/degree.R

Description

degree calculates the standardized degree centrality of the network; a higher degree centrality indicates the node has more connections to other nodes

Usage

1
degree(A.mat, type = "undirected")

Arguments

A.mat

An n x n adjacency matrix.

type

A character string indicating the type of degree centrality: "undirected", "indegree", or "outdegree". By default, it is "undirected".

Value

Returns the value of c.degree.std, a length-n vector of degree centrality scores

Examples

1
2
3
A.mat = sim_adjacency(10, mode = "directed")  # generate digraph
degree(A.mat)                                 # consider both in and out degrees
degree(A.mat, type = "indegree")              # only count indegree

lwa19/centrality documentation built on Dec. 21, 2021, 12:45 p.m.