igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Getting the vertices of an edge


From: Tamás Nepusz
Subject: Re: [igraph] Getting the vertices of an edge
Date: Mon, 7 Feb 2011 22:50:42 +0100

Hi,

> I have been using igraph in R for a while, but my knowledge is limited to the 
> user manual.
> My question is: Is there a way to programatically obtain the edges once an 
> edge is selected using E()?
I think the get.edges function is what you are looking for. This will give you 
a matrix with two columns (one for the source vertices, one for the target 
vertices) -- the number of rows in the matrix will be equal to the nubmer of 
edges in the edge sequence. E.g.:

g <- graph.full(10)
get.edges(g, E(g))
get.edges(g, E(g)[2])

-- 
T.




reply via email to

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