0

I am looking for a way to check whether a network has any isolated collection of nodes. I mean whether there are any disconnected parts in the network. Is there a general method for this?

Here's an example graph:

library(igraph)
a<-erdos.renyi.game(100,0.1)

I could not find any built in functions for igraph that would do this.

user1984076
  • 777
  • 1
  • 8
  • 16

1 Answers1

1

Like this?

library(igraph)
set.seed(1)
a<-erdos.renyi.game(20,0.1)
plot(a)
V(a)[degree(a) == 0]
lukeA
  • 53,097
  • 5
  • 97
  • 100
  • thanks for your help. Sorry I was not clear. I'm looking for a method that can tell me whether there are any disconnected parts in the network. (i.e. small clusters that are isolated from the rest of the network) – user1984076 Aug 07 '15 at 11:20
  • You mean like here http://stackoverflow.com/questions/29730624/how-to-split-an-igraph-into-connected-subgraphs#answer-29736888 ? – lukeA Aug 07 '15 at 11:29