I have a graph g with a set of vertices and a list with the names of some "special" vertices. I want the graph to display a label with the vertex name ONLY for these special vertices.
I tried something like this:
plot(g, vertex.size = 4, vertex.label = ifelse(V(g) %in% usernames, V(g)$label, ""), asp = F)
But apparently I'm missing something, because the predicate never enter TRUE. Also, it seems like V(g)$label results in the following error:
Error in ans[test & ok] <- rep(yes, length.out = length(ans))[test & ok] : replacement has length zero
Your help will be appreciated! :)