igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] R : Loop contract.vertices to calculate network measures fo


From: Dimitri Marschall
Subject: Re: [igraph] R : Loop contract.vertices to calculate network measures for groups in a social network in Igraph
Date: Wed, 17 Dec 2014 20:23:58 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi Chris,

first thank you very much for your reply. I will try to incorporate your suggestion.

The "c()" in "as.numeric" is actually useless, thank you for this hint.

But the transformation of my subv1 to a character is necessary. Igraph uses internal vertex ids (I am not sure about the correct term here). When importing the edgelist each vertex is given the id of the position in the edgelist, so individual 6 gets the id 1, individual 3 gets the id 2 and so on. If I only use "as.numeric" then Igraph uses this internal ids, which I donĀ“t know prior to the upload. So, I save my subvector (subv1) "as.chracter" to adress the vertex with the name given in the edgelist and not the Igraph id. If you want to see the difference plot(g2) with running and without running this command you will see the difference.

Kind regards,
D.A.M.





reply via email to

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