[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] how do I get 'from' and 'to' of an edge?
From: |
Charles Novaes de Santana |
Subject: |
Re: [igraph] how do I get 'from' and 'to' of an edge? |
Date: |
Thu, 22 Mar 2012 15:13:42 +0100 |
Hi,
I use to use this commands:
sources<-get.edges(net,E(net))[,2];
targets<-get.edges(net,E(net))[,1];
Maybe there is a better way to do this, but that is what I use.
Cheers,
Charles
On Thu, Mar 22, 2012 at 4:36 AM, Sam Steingold <address@hidden> wrote:
> I have a graph in R:
> Vertices: 2
> Edges: 2
> Directed: TRUE
> Edges:
>
> [0] '4f33629f41393d3d' -> '4f54f25aaf86e815'
> [1] '4f33629f41393d3d' -> '4f33629f41393d3d'
>
> How do I get the _set_ of sources (and destinations) of all edges?
> I can get all edges as E(g), and individual edges as E(g)[0..1], but how
> do I get the source and destination (from & to) of an edge?
> "Vertex and edge sequences and iterators" doc mentions 'from' and 'to'
> "special functions", but I cannot figure out how to use them.
>
> Thanks!
>
> --
> Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X
> 11.0.11004000
> http://www.childpsy.net/ http://truepeace.org
> http://pmw.org.il http://americancensorship.org http://iris.org.il
> What was the best thing before sliced bread?
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
--
Um axé! :)
--
Charles Novaes de Santana
http://www.imedea.uib-csic.es/~charles
PhD student - Global Change
Laboratorio Internacional de Cambio Global
Department of Global Change Research
Instituto Mediterráneo de Estudios Avanzados(CSIC/UIB)
Calle Miquel Marques 21, 07190
Esporles - Islas Baleares - España
Office phone - +34 971 610 896
Cell phone - +34 660 207 940