Getting error “recursive indexing failed at level 2” in R when trying to recurse through list
问题 I am getting an error "recursive indexing failed at level 2" when I try to recurse through a list of graph vertices, matching their value with a set of colors in a list. My list of colors is as follows: colrs <- list(l = "blue, c = "red", n = "gray50") Then I have a list of vertices in an igraph vs object that have the values "l", "c", or "n" on a "value" attribute (i.e. V(g)$value). The simple access that I'm trying to do is something like this: colrs[[V(g)[1]$value]] And the above works as