View source: R/followingNetwork.R
getFactionSizeRatio | R Documentation |
getFactionSizeRatio is a support function for calculating a faction size ratio of a given faction. A faction size ratio is a number of edges that connect between faction-member nodes divided by a number of total nodes within a following network.
getFactionSizeRatio(adjMat, members)
adjMat |
is an adjacency matrix of a dominant-distribution network. |
members |
is a list of member IDs of a given faction. |
This function returns a faction size ratio of a given faction.
# Given an example of adjacency matrix
A<-matrix(FALSE,5,5)
A[2,1]<-TRUE
A[c(3,4),2]<-TRUE
# Get a faction size ratio of a given faction
getFactionSizeRatio(adjMat=A,members=c(1,2,3,4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.