In the code/output below Node 153 has one neighbor (Node 156) but the degree function returns 2. Does anyone know why this would happen? The code for reading in g is included below and I took out loops so it shouldn't be joined to itself.

> j <- 153
> neighbors(g,j)
[1] 156
> degree(g,j)
[1] 2

g <- read.graph("EL.txt", format=c("edgelist"))
g <- simplify(g, remove.multiple = TRUE, remove.loops = TRUE)
g <- delete.vertices(g,which(degree(g) < 1)-1)

I'm using iGraph in R.

Thank you,

Thomas

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to