I am using igraph in R, and I have an edgelist (g) of about 9000+ interactions which occured within 78 groups. I used the decompose function to create a list of 78 individual igraphs (dg). I want to calculate the eigenvectors for each of the vectors within each igraph.
I can do this for each graph individually using
eigen_centrality(dg[[1]], directed = FALSE, scale = TRUE, weights = NULL)
However, doing all 78 graphs individually will be very time consuming and I would like to create a function or loop that will go through the list (dg) and do this for me. I'm afraid I haven't come close to writing a bit of code that will do this so I can't provide any examples of reproducible code.
Would anyone be able to suggest a solution that could do this? Each graph is under the name dg[[x]] x being 1 to 78.
Very grateful for any advice or suggestions.