igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] subgraph by passing list of nodes that grabs also nodes po


From: Gábor Csárdi
Subject: Re: [igraph] subgraph by passing list of nodes that grabs also nodes pointing to that list
Date: Wed, 13 May 2009 09:25:31 +0200

Jose,

there are many ways to do this, perhaps the simplest is to use
neighborhood() to collect the neighboring vertices and then call
subgraph().

vv <- neighborhood(g, order=1, nodes=mynodes, mode="in")
subgraph(g, unique(unlist(vv)))

Best,
Gabor

On Wed, May 13, 2009 at 7:55 AM, Jose Quesada <address@hidden> wrote:
> Hi igraph help,
>
> I have a large bipartite network. It's hard to see what's going on, so I
> would want to do a sizeable, but manageable, subset. Something I can
> plot. For this, I want the nodes I set, plus nodes pointing at them. Is
> there any way to do this? I'm thinking about something like subgraph but
> passing a list of nodes grabs also nodes pointing to that list.
>
> Is this possible? Thanks
>
>
> Best,
> -Jose
>
> --
> Jose Quesada, PhD.
> Max Planck Institute,
> Center for Adaptive Behavior and Cognition -ABC-,
> Lentzeallee 94, office 224, 14195 Berlin
> http://www.josequesada.name/
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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