0
我有200個具體商品國家的貿易數據(出口/進口)。 例子:r國家之間貿易流量/貿易網絡的可視化
a <- c(2000, 2000, 2000, 2000, 2000, 2000)
b <- c("countryA", "countryB", "countryC", "countryA", "countryC", "countryA")
c <- c("countryB", "countryC", "countryA", "countryB", "countryA", "countryB")
d<- c(100, 200, 200, 300, 400, 200)
mydata <- data.frame(a,b,c,d)
colnames(mydata) <- c("year", "exporteur", "partner", "tradeflow")
現在我想以可視化的個別貿易r中的國家之間流動。
應該是這樣的: http://www.graphviz.org/Gallery/directed/world.html
有沒有辦法做到這一點爲r?
在此先感謝!
您好,歡迎計算器!非常感謝您提供一個小的虛擬數據集和您想要的結果。你能否也請告訴我們你已經嘗試過自己。請閱讀[關於Stackoverflow](http://stackoverflow.com/about)和[問什麼](http://stackoverflow.com/help/on-topic)。正如你在這兩個鏈接中發現的,你應該「展示你的工作!」。那就是:「詢問代碼的問題必須包括嘗試解決方案,以及爲什麼他們不工作」。乾杯。 – Henrik