[Top][All Lists]

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

Re: [igraph] .graph_format

From: Harun Pirim
Subject: Re: [igraph] .graph_format
Date: Thu, 25 May 2017 12:04:10 +0300

On 25 May 2017, at 11:25, Tamas Nepusz <address@hidden> wrote:

1- Is there a neat way of reading a METIS file with .graph extension as in http://www.cc.gatech.edu/dimacs10/archive/clustering.shtml data sets using igraph?
No, as far as I know -- you'll need to convert the file manually into something that igraph can digest.
vertices for all vertices starting from 1 to the number of vertices. I could not construct an igraph graph from this list. graph.adj.list() function does not work with such type of adjacency lists?
It should work, but note that the list is expected to be 0-indexed, i.e. neighboring vertices should be numbered from 0 and not 1. What is the error message that you see?

I had done the following:
dat <- readLines("karate.graph")
l  <- lapply(dat, noquote)
gk <- graph.adjlist(l)
Error in .Call("R_igraph_adjlist", adjlist, mode, duplicate, PACKAGE = "igraph") : 
  At structure_generators.c:84 : Invalid (negative) vertex id, Invalid vertex id
In addition: There were 33 warnings (use warnings() to see them)

however, I just notice that noquote function does not return a numeric vector. also 0 index will require conversion.

thank you,


igraph-help mailing list

reply via email to

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