我在library(tidyverse)
library(igraph)
library(ggraph)
library(tidygraph)
set.seed(123)
routes_tidy <- erdos.renyi.game(25, .05, loops = T)
V(routes_tidy)$name <- 1:vcount(routes_tidy)
ggraph(routes_tidy, layout = "linear") +
geom_edge_arc(alpha = 0.6, fold = TRUE) +
geom_edge_loop()+
geom_node_text(aes(label = name), repel = FALSE)+
labs(edge_weight = "Letters")+
theme_graph()+
labs(caption = 'Node 6 shows a self-loop.')
中遇到未定义的变量错误,但在上面被声明了:
$sum