degree_tm {tnet} | R Documentation |
Degree centrality in a two-mode network
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
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
## 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)
[Package tnet version 3.0.16 Index]