我正在尝试使用以下数据框和代码创建一个桑基图:
UKvisits <- data.frame(origin=as.character(c(
"France", "Germany", "USA",
"Irish Republic", "Netherlands",
"Spain", "Italy", "Poland",
"Belgium", "Australia",
"Other countries", rep("UK", 5))),
visit=as.character(c(
rep("UK", 11), "Scotland",
"Wales", "Northern Ireland",
"England", "London")),
weights=c(
c(12,10,9,8,6,6,5,4,4,3,33)/100*31.8,
c(2.2,0.9,0.4,12.8,15.5)))
高租线:
hchart(UKvisits, "sankey", hcaes(from = origin, to = visit, weight = weights))
此示例已从此处复制:https ://github.com/jbkunst/highcharter/blob/master/dev/highcharts-v6.R
出于某种原因,每当我运行它时,绘图屏幕都保持白色,并且没有绘制任何内容。
我在 R Studio 版本 1.1.423(R 版本:4.3)上尝试这个
有人知道为什么会这样吗?