0

没有太多关于 tkplot 用户体验的信息。它对我来说只是崩溃。我有 R 版本 3.2.3 和 igraph 1.0.1 我正在尝试运行下面的脚本,但我看到 tkplot flash 瞬间,然后它关闭了。我得到与其他 tkplot 示例相同的行为。任何帮助是极大的赞赏。这个脚本对任何人都有效吗?

library(igraph)
net <- graph( edges=c(1,2, 2,3, 3, 1), n=3, directed=F )
tkid <- tkplot(net) #tkid is the id of the tkplot that will open
l <- tkplot.getcoords(tkid) # grab the coordinates from tkplot
##tk_close(tkid, window.close = T)
plot(net, layout=l)

似乎问题在于我将其作为这样的脚本运行:

R --vanilla < script.R

或者

$ R script script.R

这只是一个例子,我的实际脚本很长。那么我该如何运行呢?

4

0 回答 0