使用r中的IGRAPHE包的贸易流

使用r中的IGRAPHE包的贸易流,r,data-visualization,igraph,R,Data Visualization,Igraph,我有200个特定商品国家的贸易数据(出口/进口)。例如: b <- c("countryA", "countryB", "countryC", "countryA", "countryC", "countryA") c <- c("countryB", "countryC", "countryA", "countryB", "countryA", "countryB") d<- c(100, 200, 200, 300, 400, 200) e <- c(5,12,10,

我有200个特定商品国家的贸易数据(出口/进口)。例如:

b <- c("countryA", "countryB", "countryC", "countryA", "countryC", "countryA")
c <- c("countryB", "countryC", "countryA", "countryB", "countryA", "countryB")
d<- c(100, 200, 200, 300, 400, 200)
e <- c(5,12,10,24,25,12)
mydata <- data.frame(b,c,d,e)
colnames(mydata) <- c("exporteur", "partner", "tradeflow", "price")

b请向我们展示您的尝试。我们必须假设您已经阅读了igraph,并尝试了参数
label
label.font
label.color
等。“边的参数有前缀‘edge’”。好的,谢谢。我的解决方案:
E(mydata.igraph)$label
library(igraph)
mydata.igraph <- graph.data.frame(mydata)
plot(mydata.igraph)