Multiple bugs in setbyname.R (patch attached)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Confirmed
|
High
|
Gábor Csárdi |
Bug Description
I've had a few issues with the set operation functions in setbyname.R, namely graph.union.
- difference, union and intersection by name don't work on directed graphs, despite the documentation saying so
- safer.merge fails when one data frame has 0 rows and indicate.origin is TRUE
- get.vertices.
- related to the above two points, set operations fail if either graph has an empty node or edge list
- set operations fail if either graph doesn't have a vertex name attribute (sometimes failing silently) - instead, a meaningful error should probably be generated
I've attached a patch which fixes these issues (but could do with further testing). Hope it's helpful.
Thanks, this looks great, I'll add it soon. I am actually in the process of rewriting these functions to make them more general and faster. BUt until that is finished, your patches will be very useful. Thanks again!