igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] problem reading .net file


From: Tamas Nepusz
Subject: Re: [igraph] problem reading .net file
Date: Thu, 12 Apr 2007 19:13:26 +0200

Just checked the Pajek format - changing "Arcs" to "Arcslist" would
require to change the edge list format as well - edges should not be
listed in edge list format but in adjacency list format. I don't
really know Pajek, but if you can force it to save your network with
"Arcslist" instead of "Arcs", that would fix the bug temporarily. If
not, and you are able to re-compile igraph from source, change line
297 in foreign-pajek-parser.y to:

arcs: ARCSLINE NEWLINE arcsdefs { igraph_pajek_directed=1; };

--
T.

On 4/12/07, Tamas Nepusz <address@hidden> wrote:
Hi Simone,

That's definitely a bug caused by a typo in the foreign-pajek-parser.y
file. Try replacing "*Arcs" with "*Arcslist" in the input file -
according to the .y file, that should do the trick until the bug is
fixed.

--
Tamas

On 4/12/07, Simone Gabbriellini <address@hidden> wrote:
> btw, can you tell me also why, after importing the net file, I have:
>
>  > is.directed(g)
> [1] FALSE
>
> while the .net file represent a directed graph?
>
> sorry to trouble you with this silly questions, but I would like to
> learn igraph, cause it seems the smartest way to use R for quite
> medium network (I am studying an online community made by 800 nodes)..
>
> thank you,
> Simone
>
>
> Il giorno 12/apr/07, alle ore 18:19, Gabor Csardi ha scritto:
>
> > Simone,
> >
> > read.graph adds the "id" vertex attribute, so use that with plot:
> >
> > g <- read.graph("primoMese2004.net", format="pajek")
> > plot(g, layout=layout.kamada.kawai, labels=V(g)$id)
> >
> > or
> >
> > tkplot(g, layout=layout.kamada.kawai, labels=V(g)$id)
> >
> > Gabor
> >
> > On Thu, Apr 12, 2007 at 06:06:20PM +0200, Simone Gabbriellini wrote:
> >> Dear List,
> >>
> >> I am experiencing a problem importing a .net file into igraph.
> >> The sintax I am using is:
> >>
> >>> g<-read.graph("primoMese2004.net", format="pajek")
> >>
> >> when the file is imported and I plot it, I can see that the node
> >> labels are switched, and the more central nodes (based on degree
> >> centrality) labelled "16", "1", "50" that I had before become "2",
> >> "30" and "45"...
> >>
> >> maybe I do something wrong in the sintax?
> >>
> >> the .net file is:
> >>
> >> *Vertices 64
> >> 1 "47"
> > [...]
> >
> > --
> > Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK
> >
> >
> > _______________________________________________
> > igraph-help mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>


--
Tamas



--
Tamas




reply via email to

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