degree_tm: 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.
# NOT RUN {## Load sample datanetwork <- 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 programmedegree_tm(network)
# }