I have a membership vector created with another software and I am stuck to write it into R so that I can use iGraph' modularity function to calculate modularity of this community division.
Can someone help me with how to write the vector into R so that the Modularity(g,membership) could run?
I tried with using membership <- read.table(file), but the result could not be used with Modularity(g, membership)
Thanks,
Song