I have a data frame with two columns(edgelist)and I want to color the two columns in two different colors in the igraph plots. Like the capital letter node in blue and the small letter in dark read. My code is below.
dat <- data.frame(col1 = letters[1:20], col2 = LETTERS[1:20])
library(igraph)
g <- graph.edgelist(as.matrix(dat ),directed = T)
set.seed(2021)
plot(g, layout= layout_nicely(g))
Thanks!