igraph-help
[Top][All Lists]
Advanced

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

[igraph] how to get vertex names


From: Emile Richard
Subject: [igraph] how to get vertex names
Date: Wed, 25 Aug 2010 12:46:28 +0200

Hi,

 

Very stupid question : how can I convert a igraph.vs object to a char object ?

 

For example

 

gtest = graph.edgelist(matrix(c('a', 'b', 'a', 'c'),2,2))

 

> V(gtest)[1]

Vertex sequence:

[1] "b"

 

 

I just want to get « b » back as a character.

 

When I use as.character it sends me the vertex id , not the vertex name :

 

> as.character(V(gtest)[1])

[1] "1"

 

Thanks for any help.

 

Emile Richard

28, rue de Châteaudun
75009 Paris

1000mercis, Interactive Advertising & Marketing

www.1000mercis.com

Ligne directe +33 (0) 1 49 49 02 16
address@hidden

Standard :

+33 (0) 1 49 49 06 60

Fax :

+33 (0) 1 49 49 06 61

 

 Avant d'imprimer, pensez à l'environnement

 

 

 


reply via email to

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