> #set shape of vertex attribute according to gender
> V(graph1)$shape <- ifelse(female4 == 1, "circle", "square")
If you have an NA value somewhere in the female4 vector, this will introduce NA 
values in the shape vector as well. E.g.:

> female4 <- c(1, 0, NA)
> ifelse(female4 == 1, "circle", "square")
[1] "circle" "square" NA

So, the solution is to get rid of the NA values from your female4 vector.

-- 
T.
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to