igraph-help
[Top][All Lists]

## Re: [igraph] Problem Deleting Vertices (and creating Sub-Graphs)

 From: Ali Ogulcan Ilhan Subject: Re: [igraph] Problem Deleting Vertices (and creating Sub-Graphs) Date: Wed, 6 Jun 2018 01:57:53 +0300

Hi,

Thanks a lot, this makes sense, I donâ€™t know why I could not think of it.

ali
On Jun 4, 2018, at 2:36 PM, Yang Li <address@hidden> wrote:

If you remove a vertex from the graph, all edges connected to it are also removed. Its degree in the new graph could be smaller than 10.

Yang

On Monday, June 4, 2018, 6:11:27 AM CDT, Ali Ilhan <address@hidden> wrote:

Dear all,

I have been trying to eliminate vertices with degrees lower than certain thresholds. It should be pretty straightforward but I am having problems. I used the simple code below

Either:

mygraph2_3<-delete.vertices(mygraph2, V(mygraph2)[degree(mygraph2) < 10])

Or

e<-degree(mygraph2)

mygraph2_3<-induced_subgraph(mygraph2, v=(e>10))

In either case, when I check the degrees of the remaining vertices there are many with degrees more or less than 10 (and the mean degree for the sub-network is much less than 10). The code does something but I am not sure what it is really doing. All I want to do is to eliminate vertices with degrees less than 10.

Any help is greatly appreciated,

ali ilhan
_______________________________________________
igraph-help mailing list