Create a factor variable for the different age categories, see cut().
Then use as.integer() on the factor variable and index a vector of
node sizes with it. E.g.
g <- graph.ring(10)
V(g)$age <- sample(20:78, vcount(g), replace=TRUE)
V(g)$agecat <- cut(V(g)$age, breaks = c(20,35,50,65,78))
V(g)$siz
Hi,
I'm working on some social networks and I managed to create the graphs with
labels and edges weight, but I would also like to change the size of the
vertices according to the age of the persons in the network and the shape
according to the gender. Now for the age, I have people with ages be
2 matches
Mail list logo