[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] getting k-connected nodes from a vertex
From: |
Ross KK Leung |
Subject: |
Re: [igraph] getting k-connected nodes from a vertex |
Date: |
Thu, 6 Dec 2012 18:36:58 +0800 |
Tamas Nepusz wrote:
> g <- graph.famous("petersen")
> V(g)$name <- LETTERS[1:10]
> graph.list <- graph.neighborhood(g, 1, "A")
> g2 <- graph.list[[1]]
> V(g2)$name
[1] "A" "B" "E" "F"
> write.graph(g, "edgelist.txt",format="edgelist") so I will obtain some
> resultant files like:
The "edgelist" format uses the numeric vertex IDs, not the names. Use the
"ncol" format instead if you want to print the names.
Thanks Tamas Nepusz. Following your suggestions let me proceed to get 2
levels of nearest neighbor. In fact I don't quite get the usage of [[]] and
the "1" inside the bracket (first element in an array?), and it's difficult
to google by using [[]], would you please refer me for further reference?
Moreover, do you know why graph.neighborhood(g, 1, "A") return up to the 2nd
level? I try graph.neighborhood(g, 0, "A") but it doesn't work...
- [igraph] getting k-connected nodes from a vertex, Ross KK Leung, 2012/12/04
- Re: [igraph] getting k-connected nodes from a vertex, Gábor Csárdi, 2012/12/05
- Re: [igraph] getting k-connected nodes from a vertex, Ross KK Leung, 2012/12/06
- Re: [igraph] getting k-connected nodes from a vertex, Tamas Nepusz, 2012/12/06
- Re: [igraph] getting k-connected nodes from a vertex,
Ross KK Leung <=
- Re: [igraph] getting k-connected nodes from a vertex, Tamas Nepusz, 2012/12/06
- Re: [igraph] getting k-connected nodes from a vertex, Ross KK Leung, 2012/12/06
- Re: [igraph] getting k-connected nodes from a vertex, Tamas Nepusz, 2012/12/06
- Re: [igraph] getting k-connected nodes from a vertex, Ross KK Leung, 2012/12/08
- Re: [igraph] getting k-connected nodes from a vertex, Tamás Nepusz, 2012/12/08