igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] assortativity.nominal


From: Gábor Csárdi
Subject: Re: [igraph] assortativity.nominal
Date: Thu, 16 May 2013 02:18:47 -0400

Hi,

create a factor and supply it in the 'types' argument. E.g. 

g <- graph.ring(10)
types <- rep(c("odd", "even"), length.out=vcount(g))
assortativity.nominal(g, factor(types))
# [1] -1

Just make sure that the order of the factor corresponds to the order of your vertices.

Gabor



On Mon, May 13, 2013 at 4:17 AM, Renuka Hodigere <address@hidden> wrote:
Hello,

I would like to get the degree of assortativity in a network based on certain categorical attributes of the nodes e.g. nodes in the network have various attributes like sex, profession, education etc. I would like to know to what extent the network is assortative based on these attributes.

I tied using the assortativity.nominal function in igraph but I am not sure where I should specify the nominal variable in the script.

Thanks in advance for the help.

Regards,

renuka

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




--
Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

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