[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] working with weighted networks (from pajek .net)
From: |
Martin Tomko |
Subject: |
[igraph] working with weighted networks (from pajek .net) |
Date: |
Thu, 02 Sep 2010 10:44:15 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 |
Hi all,
I am trying to adapt my code to work with weighted networks, in igraph - R.
I have created a test pajek file with an identical graph as I used
before, just added some weights as a third column to the Edges (that is
my understanding of the handling of the .net format), as follows:
...
8703
8704
8705
*Edges
1 2 0.000528
1 6481 0.001632
2 709 0.00243
2 100 0.000134
...
When I list the graph object, the weights do not appear:
>g<-read.graph(file=f, format="pajek")
> g
Vertices: 8705
Edges: 9785
Directed: FALSE
Edges:
[0] 0 -- 1
[1] 0 -- 6480
[2] 1 -- 708
What am I doing wrong?
I assume that once I get that running, I can access the edge weight with
something like
edges <- E(g);
edges[1]$weight
Am I right?
Thanks
Martin
--
Martin Tomko
Postdoctoral Research Assistant
Geographic Information Systems Division
Department of Geography
University of Zurich - Irchel
Winterthurerstr. 190
CH-8057 Zurich, Switzerland
email: address@hidden
site: http://www.geo.uzh.ch/~mtomko
mob: +41-788 629 558
tel: +41-44-6355256
fax: +41-44-6356848
- [igraph] working with weighted networks (from pajek .net),
Martin Tomko <=
- [igraph] Re: working with weighted networks (from pajek .net), Martin Tomko, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Gábor Csárdi, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Tamas Nepusz, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Martin Tomko, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Gábor Csárdi, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Martin Tomko, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Gábor Csárdi, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Martin Tomko, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Gábor Csárdi, 2010/09/02
- Re: [igraph] Re: working with weighted networks (from pajek .net), Martin Tomko, 2010/09/02