Tag: sankey图

Sankey Diagrams in R?

我试图用R中的Sankey图来显示我的数据stream。 我发现这个博客文章链接到一个R脚本,生成一个Sankey图,不幸的是它是相当原始的,有些有限(见下面的示例代码和数据)。 有没有人知道其他脚本 – 或者甚至是一个包 – 这是更发达? 我的最终目标是通过图组件的相对大小来可视化数据stream和百分比,就像这些Sankey图的例子 。 我在r-help列表上发布了一个类似的问题 ,但两周后没有任何反应,我试图在我的运气这里在stackoverflow。 谢谢,埃里克 PS。 我知道平行集合剧情 ,但这不是我正在寻找的。 # thanks to, https://tonybreyal.wordpress.com/2011/11/24/source_https-sourcing-an-r-script-from-github/ sourc.https <- function(url, …) { # install and load the RCurl package if (match('RCurl', nomatch=0, installed.packages()[,1])==0) { install.packages(c("RCurl"), dependencies = TRUE) require(RCurl) } else require(RCurl) # parse and evaluate each .R script sapply(c(url, …), function(u) { […]