View source: R/scoring_functions.R
apply_subgraphs | R Documentation |
Applies function to each subgraph of a graph
apply_subgraphs(g, com, f, ...)
g |
igraph graph |
com |
vector of memberships that determines the subgraphs (i.e. all elements with the same label will form a subgraph). |
f |
Function to apply. Takes a graph as input and returns a scalar. |
vector with the result of each subgraph
data(karate, package="igraphdata")
apply_subgraphs(g=karate, com=V(karate)$Faction, f=gorder)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.