igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: Assign Weight to Link by Counting Repetitions


From: Gábor Csárdi
Subject: [igraph] Re: Assign Weight to Link by Counting Repetitions
Date: Mon, 5 Oct 2009 11:56:12 +0200

On Mon, Oct 5, 2009 at 11:48 AM, Lorenzo Isella
<address@hidden> wrote:
[...]
> In other words: which kind of data type is V(g)[1]? It looks like a string,
> but probably it is not (and should not be, according to the delete.vertices
> documentation).

It is a numeric vector, it is only printed as a string. In the next
igraph version you can use symbolic vertex and edge names, but in the
current version you need to translate them to numeric ids my hand.
This is not hard, if you have your symbolic names in 'symnames', then

ids <- match(symnames, V(g)$id)-1

does the translation.

Best,
Gabor

-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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