I am working with the igraph package in R
to highlight a set of vertices. E.g. in
library(igraph)
actors <- data.frame(name=c("Alice", "Bob", "Cecil", "David",
"Esmeralda"))
relations <- data.frame(from=c("Bob", "Cecil", "Cecil", "David",
"David", "Esmeralda"),
to=c("Alice", "Bob", "Alice", "Alice", "Bob", "Alice"))
g <- graph_from_data_frame(relations, directed=TRUE, vertices=actors)
plot(g)
how can I highlight vertices Bob
and David
in the plot? In general, how can I highlight vertices that are enclosed in a vector?