-1
When running the code below, I do not get the expected graphic representation. Although A is connected to C with a value of 90.16 on Plot the link A - C is 80. Someone can help?
library(igraph)
df1 <- data.frame(origem=c( "A", "B", "B"),
destino=c("C", "A", "B"),
valor=c(90.16,80,100))
grafo11 <- graph_from_data_frame(df1, directed = FALSE)
plot(simplify(grafo11, remove.loops = TRUE, remove.multiple = TRUE),
vertex.color = c("gold","skyblue")[1+(V(grafo11)$name=="B")],
edge.label = E(grafo11)$valor)
Always include in your code the libraries used.
– Carlos Eduardo Lagosta