[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [igraph] Clusters question

**From**: |
Tamas Nepusz |

**Subject**: |
Re: [igraph] Clusters question |

**Date**: |
Fri, 06 Apr 2012 11:34:59 +0200 |

**User-agent**: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 |

>*> g <- read.graph("list.txt", format="edgelist")*
>* *
>* the interpreter prompt does not come back!*
>* *
>* The graph is huge 87000 vertices and 5100000 edges.*
>* *
>* Is it that I did not wait long enough for the read to complete?*
It is more likely that the numbers in your edge list are not continuous
(i.e. they are not from zero to 86999 if you have 87000 vertices). igraph's
edge list format assumes that for a graph with N vertices, they are denoted
by integers from 0 to N-1. If your vertex IDs are not in the range 0 to N-1,
you should read the graph using format="ncol", which is practically the same
as "edgelist" but assigns the IDs seen in your file to a vertex attribute
called $id and renumbers the "real" IDs to the range 0 to N-1.
--
T.