[Top][All Lists]

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

Re: [igraph] Simple Question Loading data

From: Gábor Csárdi
Subject: Re: [igraph] Simple Question Loading data
Date: Sun, 9 Jan 2011 18:53:52 +0100


On Sun, Jan 9, 2011 at 6:35 PM, Sadz A <address@hidden> wrote:
> Hi,
> I have a graph (map in ArcGIS) that I have simplified and turned into
> network CSV files using a pre-built program (SANET), I want to read this
> into R using igraph. I condensed the link list into a .txt file of two
> columns (of points that are connected) and tried to read this into R with
> the code
>> read.graph("point.list.txt", format="edgelist")
> but got an error:
>>Error in read.graph.edgelist(file, ...) :
>  >At foreign.c:100 : parsing edgelist file failed, Parse error
> How do I load graphs into R?

There are many ways.

> and why is this not working?

Because the 'edgelist' format is supposed to contain numeric edge ids.
If you have symbolic edge ids, then read the file with read.table()
(or read.csv() for a CSV format), and create a graph from it with
graph.data.frame(). Or you can also use the 'ncol' format, which is
basically a symbolic edge list.


> I have looked at the i graph tutorial but cant work it out.
> Thank you for reading my question, all help is appreciated,
> sadz
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

Gabor Csardi <address@hidden>     UNIL DGM

reply via email to

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