I have a graph of 169 vertices and 513 edges. I need to extract all ego_networks or sub_networks to get each node with its direct neighbours. I managed to do that using ego(graph) that produces each nodes with its direct neighbourhoods. However, the results of this functionn is a list of lists and could not extract each ego as a separate igraph or adjacency matrix object.
IS there a way to extract each ego_net as an igraph or adjacency matrix object?
sub1 <- ego(graph) #sub1 is a list of lists that contain each nodes with its direct neighbours. I can access each ego network by sub1, sub1, ...etc. however, I could not extract each ego as a separate graph object.