Open ghost opened 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?
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?