[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] How to identify negative vertices in graph
From: |
capitano . nemo |
Subject: |
[igraph] How to identify negative vertices in graph |
Date: |
Thu, 14 Nov 2013 02:59:42 +0000 |
User-agent: |
autistici.org webmail |
I have a problem with the function bipartite.projection() which returns
Error in bipartite.projection(igraph_bi) :
At structure_generators.c:84 : Invalid (negative) vertex id, Invalid
vertex id
when trying to project my bipartite graph.
Unfortunately my graph is very large (IGRAPH DN-B 154626 448387 -- ) so
I can't easily reproduce the error in a minimum working example to
share.
What I tried to do was to have a look at the dataframes that I used to
create the graph object in the first place with
graph.data.frame(edges, directed=TRUE, vertices=nodes)
I checked the "id" column of my "nodes" df along with the "from" column
of my "edges" df for negative values. (By the way, both "id" and "from"
columns are character vectors, not numeric). Indeed I found 25
"negative" strings in my "id" column of the "nodes" df--it depends on
the first character, non-alphanumerics make for a negative value of the
string. But still after removing all the negative strings, and after
double-checking again both "id" and "from" columns, I keep getting the
same error from bipartite.projection()
Error in bipartite.projection(igraph_bi) :
At structure_generators.c:84 : Invalid (negative) vertex id, Invalid
vertex id
Now my problem is to understand how to find where the negative values
that trigger the error are hidden.
Is the value of the column "id" used as id of the node without any
transformation (and same for the column "from" for edges) by the
function graph.data.frame?
How can I get the id values out of the graph object to check for
negative values?
- [igraph] How to identify negative vertices in graph,
capitano . nemo <=
- Re: [igraph] How to identify negative vertices in graph, Gábor Csárdi, 2013/11/13
- Re: [igraph] How to identify negative vertices in graph, capitano . nemo, 2013/11/13
- Re: [igraph] How to identify negative vertices in graph, Frederik Elwert, 2013/11/14
- Re: [igraph] How to identify negative vertices in graph, capitano . nemo, 2013/11/14
- Re: [igraph] How to identify negative vertices in graph, Tamás Nepusz, 2013/11/14
- Re: [igraph] How to identify negative vertices in graph, capitano . nemo, 2013/11/14
- Re: [igraph] How to identify negative vertices in graph, capitano . nemo, 2013/11/14
- Re: [igraph] How to identify negative vertices in graph, Gábor Csárdi, 2013/11/15