oh, i found the way of adding edges by node id, it's graph[id1,id2]<-1, so i
can add the two types of nodes in advance and then add the edges according to
the edgelist, that's great~
BYW, about the value of "type" of the nodes for bipartiting, it tested by
adding a new node with another type value "t". as a result, although
bipartite.mapping still returned TRUE, but the values of type became confusing.
some nodes of "s" type is TRUE, some other nodes of "s" type is FALSE. so i
think for bipartiting, let type be TRUE or FALSE is better.
Gang
------------------ ???????? ------------------
??????: "G??bor Cs??r"<[email protected]>;
????????: 2013??8??2??(??????) ????9:23
??????: "Help for igraph users"<[email protected]>;
????: Re: [igraph]?????? bipartite from edgelist?
On Thu, Aug 1, 2013 at 11:26 PM, ???????????? <[email protected]> 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.
Gabor
[...]
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help