## Small example graph, leading eigenvector by default
kite <- graph.famous("Krackhardt_kite")
graph.eigen(kite)[c("values", "vectors")]
## Double check
eigen(get.adjacency(kite, sparse=FALSE))$vectors[,1]
## Should be the same as 'evcent' (but rescaled)
cor(evcent(kite)$vector, graph.eigen(kite)$vectors)
## Smallest eigenvalues
graph.eigen(kite, which=list(pos="SM", howmany=2))$values
Run the code above in your browser using DataCamp Workspace