igraph-help
[Top][All Lists]
Advanced

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

RE: [igraph] New user ...


From: Miguel Pereira
Subject: RE: [igraph] New user ...
Date: Tue, 13 Oct 2009 22:02:04 +0100

Thank you for the help

Miguel Pereira
Ph.D. candidate
Personal webpage: http://home.cea.uevora.pt/~masp/index.html
Research: http://www.catedra.uevora.pt/rui-nabeiro/index.php/rui_nabeiro


-----Mensagem original-----
De: address@hidden
[mailto:address@hidden nome de Tamas
Nepusz
Enviada: terca-feira, 13 de Outubro de 2009 21:17
Para: Help for igraph users
Assunto: Re: [igraph] New user ...


Hi Miguel and welcome to the igraph mailing list!

> How do I use X and Y coordinates to define vertex of my network?
I'm not an expert in igraph's R interface, but there is at least one  
way to do it (this might not be the best, but I managed to figure this  
out):

g <- graph.empty(nrow(vertex))
V(g)$coox <- vertex[,1]
V(g)$cooy <- vertex[,2]

V(g) represents all the vertices of the graph; the above syntax can be  
used to assign attributes to the vertices. Similarly, E(g) represents  
all the edges.

Alternatively, you might consider using graph.data.frame() which  
requires two data frames; one for the edges and one for the vertices.  
The columns of the vertex data frame will automatically be assigned to  
the corresponding attributes in the graph. See ?graph.data.frame for  
more information.

-- 
Tamas



_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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