View source: R/EI_network_function.R
ei_network | R Documentation |
This function calculates the E-I Index (External-internal) at the network level
ei_network(gs, attrname)
gs |
igraph object |
attrname |
Attribute name |
Group level results dataframe
require(igraph)
##Create random network (igraph object)
gs<-erdos.renyi.game(75,0.05,directed = TRUE)
##Add vertex names
V(gs)$name<-1:vcount(gs)
## Add an attribute
V(gs)$letters<- rep(LETTERS[1:5],15)
##Calculate the Group E-I Results
EI_NETWORK<-ei_network(gs,"letters")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.