igraph-help
[Top][All Lists]
Advanced

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

[igraph] help: R bomb when calculating assortativity with NA values


From: Veronika Zeus
Subject: [igraph] help: R bomb when calculating assortativity with NA values
Date: Tue, 15 Nov 2016 17:50:11 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hello,

I am working in R Studio 0.99.903 and want to calculate the
assortativity for two variables.
1. Do individuals cluster if they are of the same sex? Male (m) or
Female (f)
2. Do individuals cluster if they have the same reproductive status?
Reproductive active (y), non-active (n), NA <- so here I have quite some
NA values

the association data is in file "network_2013"
the info on sex and reproductive status of the individuals is in file
my_supp_2013


#conversion of network data into igraph graph
net_graph_2013 <-
graph.adjacency(network_2013,mode="undirected",weighted=TRUE,diag=FALSE)

# Sex
assortativity_nominal(net_graph_2013, my_supp_2013$Sex, directed=F)

# Repr Status
assortativity_nominal(net_graph_2013, my_supp_2013$Repro, directed=F)


I do not know why it works for the Sex but not for Reproductive Status.
I assume it has to do with the NA values?

Please help.


Veronika

Attachment: network2013.csv
Description: Text Data

Attachment: my_supp_2013.csv
Description: Text Data


reply via email to

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