igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Problem using graph.bipartite function


From: Tamás Nepusz
Subject: Re: [igraph] Problem using graph.bipartite function
Date: Thu, 28 Feb 2013 11:13:59 +0100

Hi,

I assume that "C1 C2" is the header of your file and they are not actual nodes. 
Delete that line and use read.graph(..., format="ncol") to read the file into 
igraph. This will not create you a bipartite graph yet, only a "simple" graph, 
but the only thing you need to do in order to make it bipartite is to assign a 
"type" vertex attribute with TRUE/FALSE values to define the two parts of the 
graph. This can be done based on the vertex names of your graph:

> g <- read.graph("sample1.txt", format="ncol")
> V(g)$type <- substr(V(g)$name, 1, 1) == "d"

-- 
T.

On 28 Feb 2013, at 08:32, Yaseswini N <address@hidden> wrote:

> Hi,
> 
> I have been using the igraph(version:0.6) package and I am facing a problem 
> with the graph.bipartite function
> >graph.bipartite(types, edges, directed=FALSE)
> .I am unable to assign the edge vector correctly for my data.Could you please 
> help me out in assigning the right edge vector for my data.
> 
> Please find the toy data as an attachment to this mail.
> 
> Thank you,
> Yaseswini.N
> University of Hyderabad.
> 
> -- 
> Yaseswini.N
> <sample1.txt>_______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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