neo4j-rstats / neo4r

A Modern and Flexible Neo4J Driver
https://neo4j-rstats.github.io/user-guide/
Other
106 stars 30 forks source link

Error in converting to igraph: Some vertex names in edge list are not listed in vertex data frame #81

Open ghost opened 3 years ago

ghost commented 3 years ago

Here is the code I found in chapter 6 converting graph objects to igraph

G$nodes <- G$nodes %>% unnest_nodes(what = "properties") %>% mutate(label = map_chr(label, 1)) head(G$nodes) G$relationships <- G$relationships %>% unnest_relationships() %>% select(startNode, endNode, type, everything()) head(G$relationships) graph_object <- igraph::graph_from_data_frame( d = G$relationships, directed = TRUE, vertices = G$nodes )

Here is the error I receive: Error in igraph::graph_from_data_frame(d = G$relationships, directed = TRUE, : Some vertex names in edge list are not listed in vertex data frame

Anyone can help?