[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Re: network neighborhood
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] Re: network neighborhood |
Date: |
Mon, 4 Oct 2010 10:25:53 +0200 |
On Mon, Oct 4, 2010 at 8:35 AM, anupam sinha <address@hidden> wrote:
> Hi Gabor,
> Thanks a lot for your reply. The program is working fine
> but I am unable to understand the output.Suppose one has following edgelist
> file of an undirected network:
>
> A - B
> A - C
> A - D
> C - E
> C - F
>
> Now if I run graph.neighborhood on this file shouldn't I get two subgraphs
>
> A-B and A-C
> A-C C-E
> A-D C-F
You get as many graphs, as many vertices in the graph (if you don't
use 'nodes' argument at least):
> g <- graph.formula(A-B:C:D, C-E:F)
> graph.neighborhood(g, order=1)
[[1]]
Vertices: 4
Edges: 3
Directed: FALSE
Edges:
[1] 'A' -- 'B'
[2] 'A' -- 'C'
[3] 'A' -- 'D'
[[2]]
Vertices: 2
Edges: 1
Directed: FALSE
Edges:
e
e [1] 'A' -- 'B'
[[3]]
Vertices: 4
Edges: 3
Directed: FALSE
Edges:
[1] 'A' -- 'C'
[2] 'C' -- 'E'
[3] 'C' -- 'F'
[[4]]
Vertices: 2
Edges: 1
Directed: FALSE
Edges:
e
e [1] 'A' -- 'D'
[[5]]
Vertices: 2
Edges: 1
Directed: FALSE
Edges:
e
e [1] 'C' -- 'E'
[[6]]
Vertices: 2
Edges: 1
Directed: FALSE
Edges:
e
e [1] 'C' -- 'F'
> One more thing is that I am unable to send any attachments to the
> igraph-help mail group . The mail simply bounces back. Thanks in advance for
> any suggestions.
The reason for this should be in the email you get back. Maybe the
attachment is too big. Attachments are allowed, AFAIK.
Best,
Gabor
> Regards,
>
> Anupam
>
[...]
--
Gabor Csardi <address@hidden> UNIL DGM