degree_tm: Degree centrality in a two-mode network

Description Usage Arguments Value Note Author(s) References Examples

Description

This function calculates two degree measures: the number of contacts that a node is connected to, and the sum of weights on ties originating from a node (strength).

Usage

1
degree_tm(net,measure=c("degree","output"))

Arguments

net

A two-mode network

measure

specifies which measures should be calculated

Value

Returns a data.frame with two or three columns: the first column contains the nodes' ids, and the remaining columns contain the scores of the measures specified in the measure-parameter.

Note

version 1.0.0

Author(s)

Tore Opsahl; http://toreopsahl.com

References

http://toreopsahl.com/blog/

Examples

1
2
3
4
5
6
7
8
## Load sample data
network <- cbind(
i=c(1,1,2,2,2,3,3,4,5,5,6),
p=c(1,2,1,3,4,2,3,4,3,5,5),
w=c(3,5,6,1,2,6,2,1,3,1,2))

## Run the programme
degree_tm(network)

tnet documentation built on Feb. 25, 2020, 1:07 a.m.