igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Sorting nodes according to degree


From: Chris Watson
Subject: Re: [igraph] Sorting nodes according to degree
Date: Sun, 3 Sep 2017 13:57:40 -0500

Assume your graph is "g".

First question:

k <- degree(g)
deg.order <- order(k, decreasing=TRUE)
V(g)[head(deg.order, 10)]

Second question can be obtained in the same fashion, using "coreness" instead of "degree".
Chris


On Sun, Sep 3, 2017 at 10:31 AM, giorgio delzeri <address@hidden> wrote:
Hi!
Starting from a scale-free graph with 1000 nodes, I want to obtain a vector with the 10 nodes whit the highest degree.
Anyone have any advise to help me reaching my purpose?
And, if I want a cecond vector with the 10 nodes with the highest coreness (Ks), how can I obtain it?
Thank in advice, and sorry for my bad english.
Giorgio


Mail priva di virus. www.avast.com

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

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