igraph-help
[Top][All Lists]

## Re: [igraph] iGraphObjects

 From: harun pirim Subject: Re: [igraph] iGraphObjects Date: Sat, 06 Mar 2010 07:14:22 -0600 User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

```On 3/5/10 5:47 PM, Gábor Csárdi wrote:
```
```Hi Harun,

On Fri, Mar 5, 2010 at 4:22 PM, Harun Pirim<address@hidden>  wrote:
[...]
```
```1-) cGrph<- lapply(1:3, delete.edges(MST,
c(which.max(edge.betweenness(MST))-1)))  I use that script to iteratively
remove the most between 3 edges in MST(a tree) but this doesn’t work.

So how can end up with a forest removing the most between 3 edges using a
loop structure?
```
```A loop structure is not easy, because the edge ids are reassigned
after each edge deletion. You would need to use edge attributes to
keep track of the edges. Another solution is to remove all edges at
the same time.

But actually, why do you think that removing the edges with the top
edge betweenness values gives you an MST? I think this is not true in
general.

```
I want to remove the most between edge from the MST and recalculate betweenness then remove the most between edge again from the forest(MST became forest) and recalculate the betweenness then remove the most between edge and so on...
```2-) I have many subgraphs, I want to calculate the degree of vertices in
each subgraph and hold them in a list to be able to compare with the values
in another list.
```
```Put the subgraphs in a list:

mylist<- list(g1, g2, g3)
```
do I have to write g1, g2, g3, .....g100 by hand? can I use an assignment procedure for the list to keep all graphs?
```
thanks Harun
```
```degs<- sapply(mylist, degree)

Best,
Gabor

```
```I tried this code:

y<- lapply(0:4, function(i) paste(sgr, i, sep="") )

here sgr1 for example is a graph object, I was hoping exactly to get sgr1
object values when I write y[[2]], however this list gives confusing
elements which is really different than sgr0, sgr1, sgr2, sgr3, sgr4.

Sgr1 is :

Vertices: 3

Edges: 3

Directed: FALSE

Edges:

[0] 'ERn_LNp_Nevins7'  -- 'ERn_LNn_Nevins26'

[1] 'ERn_LNp_Nevins7'  -- 'ERn_LNn_Nevins48'

[2] 'ERn_LNn_Nevins26' -- 'ERn_LNn_Nevins48'

Best Regards,

Harun Pirim

MS State Univ.

Ind.&  Sys. Eng. Dept.

www2.msstate.edu/~hp100

_______________________________________________
igraph-help mailing list
http://lists.nongnu.org/mailman/listinfo/igraph-help

```
```

```
```

```