View source: R/functions_statistics.R
number_ties | R Documentation |
This function computes the number of ties.
number_ties(partition, dyadic_attribute, stat)
partition |
A partition (vector) |
dyadic_attribute |
A matrix containing the values of the attribute |
stat |
The statistic to compute : 'avg_pergroup' for the average per group , 'sum_pergroup' for the sum, 'sum_perind' and 'avg_perind' for the number of ties per individuals each individual has in its group. |
The statisic chosen in stat
p <- c(1,2,2,3,3,4)
v <- c(0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0)
at <- matrix(v,6,6, byrow = TRUE)
number_ties(p,at,'avg_pergroup')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.