简单交互式可视化,使用R
问题描述:
如果有一个简单的例子(用于数据见下文),我可以想像如下的网络的:简单交互式可视化,使用R
[![网络] [1] [1]
我问题是,我想使用弹出窗口来显示更多信息(不适合图形)。问题是:我该如何做到这一点? 我发现了很多东西,但是我无法让这个例子工作,这可能是由于我从未用Java编写过的。我也应该说,我不需要花哨/复杂的3D内容。只需一个弹出窗口就能完成这项工作
任何帮助,高度赞赏!
链接:
- presentation:我无法重现的例子,我觉得我不需要那么多。
- tutorial第7.1章:我无法重现的例子
下面是数据
library(ggraph)
library(igraph)
nodes <- c("cool_fun", "mysum", "mydot", "myfun", "stupid_fun")
list_edges <- structure(list(
cool_fun = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
mysum = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
mydot = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
myfun = structure(list(edges = c("mysum", "mydot"),
weights = c(1, 1)),
.Names = c("edges", "weights")),
stupid_fun = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights"))),
.Names = c("cool_fun", "mysum", "mydot", "myfun", "stupid_fun"))
my_graph <- graph::graphNEL(nodes=nodes, edgeL=list_edges, edgemode = "directed")
plot(my_graph)
答
有迹象表明,让你制作网络图,包等。尝试安装并使用visNetwork
包。他们的主页上实际上有一个例子,可以完全符合你的要求。
链接:
也许plotly:https://plot.ly/r/network-graphs/ – boshek