powered by
Applies function to each subgraph of a graph
apply_subgraphs(g, com, f, ...)
vector with the result of each subgraph
igraph graph
vector of memberships that determines the subgraphs (i.e. all elements with the same label will form a subgraph).
Function to apply. Takes a graph as input and returns a scalar.
data(karate, package="igraphdata") apply_subgraphs(g=karate, com=V(karate)$Faction, f=gorder)
Run the code above in your browser using DataLab