igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] RES: Egonetworks in Igraph


From: Gábor Csárdi
Subject: Re: [igraph] RES: Egonetworks in Igraph
Date: Wed, 14 Sep 2011 16:04:02 -0400

On Wed, Sep 14, 2011 at 3:36 PM, Carlos Eduardo <address@hidden> wrote:
> Thanks! It worked! Anyway, a couple of questions appeared:
>
> I executed the follow command: h<-graph.neighborhood(g,1,1). But class(h)
> shows that h is a "list". Is there any way to:

It is a list of igraph objects. You can supply many egos, and then get
a list of ego networks. If you just have one ego, then h[[1]] will
give you that ego network.

> a.1) change h to a "igraph" object?
>
> a.2) insert h (list) as a attribute of g (igraph), bearing in mind to
> identify visually (e.g. through Visone software) the egonetwork as a part of
> the bigger network?
>
> b) I'd prefer to use the vertex identification (e.g. $name) rather than the
> vertex number. Is there any way to show a correspondence list between vertex
> number and other attribute (e.g. $name). Some output like this:

E.g.

data.frame(ID=as.vector(V(g)), name=V(g)$name)

You can actually give the vertex names instead of vertex ids:

graph.neighborhood(g, 1, "BRA")

Gabor

> 1-BRA
> 2-ARG
> 3-KOR
> 4-CHI
> 5-EUN
> 6-RUS
>
> Thanks in advance,
> Cadu
>
>
> -----Mensagem original-----
> De: address@hidden
> [mailto:address@hidden Em nome de Gábor
> Csárdi
> Enviada em: quarta-feira, 14 de setembro de 2011 13:13
> Para: Help for igraph users
> Assunto: Re: [igraph] Egonetworks in Igraph
>
> On Wed, Sep 14, 2011 at 12:10 PM, Carlos Eduardo <address@hidden>
> wrote:
> [...]
>> The question: Is there any command to pick up egonetworks inside a large
>> network?
>
> Use graph.neighborhood(), and give order=1, and nodes=<your ego>.
>
> Gabor
>
> [...]
> --
> Gabor Csardi <address@hidden>     MTA KFKI RMKI
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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