Dear Tamas,

Thanks for your advice here. I had NA values in my ethmin4 vector as well,
but this did not seem to affect the colouring of the vertices. But I guess
it affects the shapes. So I will try this and see.

Many thanks,
Meena


On 3 April 2013 21:43, Tamás Nepusz <[email protected]> wrote:

> > #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
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to