全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2247 4
2012-09-17
1.2.1节有如下程序,
#1.2.1 Undirected Graphs
library(gRbase)
#下面四句是等价的
ug0 <- ug(~a:b, ~b:c:d, ~e)
ug0 <- ug(~a:b+b:c:d+e)
ug0 <- ug(~a*b+b*c*d+e)
ug0 <- ug(c("a","b"),c("b","c","d"),"e")
ug0

紧接着有
library(Rgraphviz)
plot(ug0)

为什么我的运行了plot(ug0)画不出来图,并有以下错误
Error: Layout type: "dot" not recognized. Use one of:
Warning messages:
1: In plot.xy(xy.coords(x, y), type = type, ...) :  "len" is not a graphical parameter
2: In plot.xy(xy.coords(x, y), type = type, ...) :  "edgemode" is not a graphical parameter
3: In plot.xy(xy.coords(x, y), type = type, ...) :  "len" is not a graphical parameter
4: In plot.xy(xy.coords(x, y), type = type, ...) :  "edgemode" is not a graphical parameter
5: In plot.xy(xy.coords(x, y), type = type, ...) :  "len" is not a graphical parameter
6: In plot.xy(xy.coords(x, y), type = type, ...) :  "edgemode" is not a graphical parameter
7: In plot.xy(xy.coords(x, y), type = type, ...) :  "len" is not a graphical parameter
8: In plot.xy(xy.coords(x, y), type = type, ...) :  "edgemode" is not a graphical parameter
There were 16 warnings (use warnings() to see them)



所有的运行是
> library(gRbase)
> ug0 <- ug(~a:b, ~b:c:d, ~e)
> ug0 <- ug(~a:b+b:c:d+e)
> ug0 <- ug(~a*b+b*c*d+e)
> ug0 <- ug(c("a","b"),c("b","c","d"),"e")
> ug0
A graphNEL graph with undirected edges
Number of Nodes = 5
Number of Edges = 4
> library(Rgraphviz)
> plot(ug0)
Layout type: "dot" not recognized. Use one of:
Warning messages:
1: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter
2: In plot.xy(xy.coords(x, y), type = type, ...) : "edgemode" is not a graphical parameter
3: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter
4: In plot.xy(xy.coords(x, y), type = type, ...) : "edgemode" is not a graphical parameter
5: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter
6: In plot.xy(xy.coords(x, y), type = type, ...) : "edgemode" is not a graphical parameter
7: In plot.xy(xy.coords(x, y), type = type, ...) : "len" is not a graphical parameter
8: In plot.xy(xy.coords(x, y), type = type, ...) : "edgemode" is not a graphical parameter
There were 16 warnings (use warnings() to see them)


谢谢!




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-9-17 22:47:02
DDDDDDD
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-9-18 07:34:00
我的R运行起来没有错误,是不是Rgraphviz没装好,我记得当时我搞了半天这个包
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-9-18 08:03:03
那个包很难搞!你看看是否是那个包安装的有问题!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-9-18 09:04:58
谢谢楼上各位,包的安装没有问题。设置了环境变量,并读了该包的readme.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群