[Top][All Lists]

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

Re: [igraph] 回复: bipartite from edgelist ?

From: Gábor Csárdi
Subject: Re: [igraph] 回复: bipartite from edgelist ?
Date: Fri, 2 Aug 2013 09:23:01 -0400

On Thu, Aug 1, 2013 at 11:26 PM, 四正(红砖) <address@hidden> wrote:

for an edgelist file, we can use read.graph(in R) to load the graph, it seems fast, and the node id in edgelist file will be used as real node id.

however, if i add the vertices by reading the edgelist file myself, the node ids in the file will be only used as the names of the vertices.

It would be nice to have some complete example (=code), to see what exactly you did. read.graph() can read various formats, and sometimes vertex names are created, sometimes not. I guess you used format="edgelist", so no vertex names were added.

if i add the two types of vertices in advance, how can i add the edges between them according to the edgelist file? it seems that add.edges can only add edges by names of the node?

You can add edges based on numeric vertex ids as well. The type of the vertex has not much to do with the name of the vertex, so I still don't get the problem.



reply via email to

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