I am trying to calculate homophily for the graph, my concern is regards to the missing attribute for the vertex which we calculate homophily based on that :
karate <- graph.famous("Zachary")
karate <- add.vertices(karate, 6) #to have zero degree vertecies
V(karate)$gender<-as.character(c(1,-1,0,1,1,0,1,1,0,-1,0,-1,0,1,0,-1,0,1,0,1,1,0,-1,0,1,0,-1,1,1,0,-1,0,1,0,1,-1,1,0,1,0))
if we include the Na's value we would get back NA so missing values are replace with -1 here,but I guess it consider it as a new type, How to avoid that ?