qgraph中无效的颜色名称背景 [英] invalid color name background in qgraph

查看:160
本文介绍了qgraph中无效的颜色名称背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用qgraph生成网络图.代码如下

I have been trying to use qgraph to generate the network graph. The code is as following

Gw <- qgraph(edgeList, diag = TRUE, labels = TRUE,legend.cex = 0.3, vsize = 1,edge.color=colorLabels,legend=TRUE,asize=1)

该图可以生成,但是R命令行给出以下错误消息.我不知道invalid color name 'background'是什么意思.

The figure can be generated, but the R command line gives the following error message. I do not know what does the invalid color name 'background' mean.

dput结果如下所示,

dput(edgeList) 结构(c("1","2","2","3","4","5","6","7","8","1", "9","10","11","12","13","14","15","16","17","18","16", "4","5","7","1","9","10","19","20","2","16","21","3", "22","5","23","8","1","20","2","13","14","17","14", "1","19","14","2","21","14","24","1",:499.3","nk Transfe", "de tran","up(非美国)","up(非美国","up(非美国"),"up(非美国"), "up(non-US)","up(non-US","up(non-US","up(non-US","up(non-US"), "ine:4121","ine:3257.4","ine:75.2","ine:75.2","ine:11615". "ine:10603","ine:334.2","ine:7256.8","ine:7256.8","ine:996.8", "ine:884.6","ine:364.9","ine:6360","ine:5640.9","ine:2729.7", "ine:5482.6","ine:85","ine:1474.9","ine:700.8","ine:2754.6", "ine:3257.4","ine:3257.4","ine:7307.8","ine:18560.","ine:85.1", "ine:364.8",:700.1",:5317","l:4258.9","l:4258.9","l:1637.6", "l:1637.6","l:46.4","l:3938.5","l:3938.5","l:2800.4","l:2715.1", "l:2715.1","l:12708.2","l:1042",:499.3","nk Transfe","de tran", "up(non-US)","up(non-US","up(non-US","up(non-US","up(non-US"), "up(non-US","up(non-US","up(non-US","up(non-US","ine:4121"), "ine:3257.4","ine:75.2","ine:75.2","ine:11615.","ine:10603", "ine:334.2","ine:7256.8","ine:7256.8","ine:996.8","ine:884.6", "ine:364.9","ine:6360","ine:5640.9","ine:2729.7","ine:5482.6", "ine:85","ine:1474.9","ine:700.8","ine:2754.6","ine:3257.4", "ine:3257.4","ine:7307.8","ine:18560.","ine:85.1","ine:364.8", :700.1",:5317","l:4258.9","l:4258.9","l:1637.6","l:1637.6", "l:46.4","l:3938.5","l:3938.5","l:2800.4","l:2715.1","l:2715.1", "l:12708.2","l:1042","25","1","1","26","27","28","29", "30","31","25","32","33","4","4","3","3","5","5","7", "6","6","27","28","30","25","32","33","9","8","1", "1","10","12","12","16","16","16","16","8","1","3", "3","7","7","25","9","9","1","10","10","14","14"),. Dim = c( 104公升 2L),.Dimnames = list(NULL,c("newsendId","newtoId")))

dput(edgeList) structure(c("1", "2", "2", "3", "4", "5", "6", "7", "8", "1", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "16", "4", "5", "7", "1", "9", "10", "19", "20", "2", "16", "21", "3", "22", "5", "23", "8", "1", "20", "2", "13", "14", "17", "14", "1", "19", "14", "2", "21", "14", "24", "1", ":499.3", "nk Transfe", "de of tran", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "ine:4121", "ine:3257.4", "ine:75.2", "ine:75.2", "ine:11615.", "ine:10603", "ine:334.2", "ine:7256.8", "ine:7256.8", "ine:996.8", "ine:884.6", "ine:364.9", "ine:6360", "ine:5640.9", "ine:2729.7", "ine:5482.6", "ine:85", "ine:1474.9", "ine:700.8", "ine:2754.6", "ine:3257.4", "ine:3257.4", "ine:7307.8", "ine:18560.", "ine:85.1", "ine:364.8", ":700.1", ":5317", "l:4258.9", "l:4258.9", "l:1637.6", "l:1637.6", "l:46.4", "l:3938.5", "l:3938.5", "l:2800.4", "l:2715.1", "l:2715.1", "l:12708.2", "l:1042", ":499.3", "nk Transfe", "de of tran", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "up(non-US ", "ine:4121", "ine:3257.4", "ine:75.2", "ine:75.2", "ine:11615.", "ine:10603", "ine:334.2", "ine:7256.8", "ine:7256.8", "ine:996.8", "ine:884.6", "ine:364.9", "ine:6360", "ine:5640.9", "ine:2729.7", "ine:5482.6", "ine:85", "ine:1474.9", "ine:700.8", "ine:2754.6", "ine:3257.4", "ine:3257.4", "ine:7307.8", "ine:18560.", "ine:85.1", "ine:364.8", ":700.1", ":5317", "l:4258.9", "l:4258.9", "l:1637.6", "l:1637.6", "l:46.4", "l:3938.5", "l:3938.5", "l:2800.4", "l:2715.1", "l:2715.1", "l:12708.2", "l:1042", "25", "1", "1", "26", "27", "28", "29", "30", "31", "25", "32", "33", "4", "4", "3", "3", "5", "5", "7", "6", "6", "27", "28", "30", "25", "32", "33", "9", "8", "1", "1", "10", "12", "12", "16", "16", "16", "16", "8", "1", "3", "3", "7", "7", "25", "9", "9", "1", "10", "10", "14", "14"), .Dim = c(104L, 2L), .Dimnames = list(NULL, c("newsendId", "newtoId")))

生成的图形如下.我用以下命令生成了它

The generated figure is as follows. I used the following command to generate it

Gw <- qgraph(edgeList, layout = "spring", diag = FALSE, labels = TRUE, cut = NULL, edge.color = "red",legend.cex = 0.5, vsize = 8)

推荐答案

哪个节点有问题?使用数据和代码,您可以修改label.cex.标签和图例大小的参数还有其他变体..这是一个版本,颜色为蓝色.

Which nodes are problems? With your data and code you can modify label.cex. There are other variations of the arguments for the label and legend sizes. Here is one version, with the color blue.

library(qgraph)
Gw <- qgraph(edgeList, layout = "spring", diag = FALSE, labels = TRUE, cut = NULL, edge.color = "red", legend.cex = 0.3, vsize = 4, label.cex = 0.3, label.color = "blue")
Gw

这篇关于qgraph中无效的颜色名称背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆