[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] changing vertex shape according to vertex characteristics
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] changing vertex shape according to vertex characteristics |
Date: |
Wed, 3 Apr 2013 22:43:35 +0200 |
> #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.