0

I have a symmetric adjacency matrix with binary values (0, 1) in R. Let's say:

library(igraph)
g <- erdos.renyi.game(10, 10, type="gnm", directed = FALSE, loops = TRUE)
m <- get.adjacency(g)

I need to do spectrum analysis of this graph, by producing a list of sublists of eigenvalues with their respective multiplicities. I am aware of functions like eigen(m). This previous question used it, but did not explain any automatic way for counting multiplicities:

number of distinct eigenvectors in R

Community
  • 1
  • 1

1 Answers1

0

If the multiplicity of an eigenvalue is n, it appears n times in eigen(m)$values.

mra68
  • 2,960
  • 1
  • 10
  • 17