igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Creating a bipartite graph


From: Mouly
Subject: [igraph] Creating a bipartite graph
Date: Mon, 2 Nov 2009 09:57:21 -0500


I'm trying to create a bipartite graph (one group is a numeric ids, and the other is a string) with the following command:

g <- graph.bipartite(rep(0:1,10),c('1','a','2','c','3','a',1,'c','4','d'))

I get the error message 

Error in graph.bipartite(rep(0:1, 10), c("1", "a", "2", "c", "3", "a",  : 
  At bipartite.c:456 : Invalid edges, not a bipartite graph, Invalid value
In addition: Warning message:
In graph.bipartite(rep(0:1, 10), c("1", "a", "2", "c", "3", "a",  :
  NAs introduced by coercion

Can someone show me the correct way to create a bipartite graph? I don't understand how igraph validates that the edges do belong to different groups. 

-mouly







reply via email to

[Prev in Thread] Current Thread [Next in Thread]