使用Heatmap2功能在R中。获取错误消息:PAR中的错误(OP):图形参数PIN的无效值
我正在使用R中的热图并使用Heatmap2函数来创建相关热图。昨晚我创建了一个热图,很好。我只错过了添加一个变量“体育参与”,然后又回来添加它,现在它不起作用,并向我显示此错误:
.external.graphics中的错误.integer(num.figures),: 无效的图形状态 PAR(OP)中的错误:为图形参数“ PIN”指定的无效值
这是我的代码:
labvec <- c(rep("ACE Score"))
labvec[c("Bully-Victim","Family Resilience",
"TBI","Child's Sex","Child's Age",
"Child's Race","Caregiver Education","Sports
Involvement","Epilepsy
Status", "Percent FPL")] <- c("Bully-Victim","Family Resilience",
"TBI","Child's Sex","Child's Age",
"Child's Race","Caregiver Education","Sports Involvement","Epilepsy
Status", "Percent FPL")
heatmap.2(acenation[,-1], cellnote = acenation[,-1], notecol
= "black", key.xlab = "r value",
trace = "none",
par(cex.main=0.8),
dendrogram = "column", density.info = "none", cexCol =1.3,
cexRow = 1.3,
Rowv = NA,
margins = c(15,15),
labRow = labvec,
main = "Correlation Matrix Between ACE Score, TBI and Covariates",
scale= "none",col= brewer.pal(8, "Greens"))
在两个月前破解后,我几次使用此代码创建了多个加热地图。但是,它现在不起作用。任何帮助将不胜感激。非常感谢!
I am working with heat map in R and using heatmap2 function to create a correlation heat map. I created a heat map last night and it was just fine. I only missed to add one variable "Sports Involvement" and came back to add it and now it isn't working and showing me this error:
Error in .External.graphics(C_layout, num.rows, num.cols, mat, as.integer(num.figures), :
invalid graphics state
Error in par(op) : invalid value specified for graphical parameter "pin"
Here is my code:
labvec <- c(rep("ACE Score"))
labvec[c("Bully-Victim","Family Resilience",
"TBI","Child's Sex","Child's Age",
"Child's Race","Caregiver Education","Sports
Involvement","Epilepsy
Status", "Percent FPL")] <- c("Bully-Victim","Family Resilience",
"TBI","Child's Sex","Child's Age",
"Child's Race","Caregiver Education","Sports Involvement","Epilepsy
Status", "Percent FPL")
heatmap.2(acenation[,-1], cellnote = acenation[,-1], notecol
= "black", key.xlab = "r value",
trace = "none",
par(cex.main=0.8),
dendrogram = "column", density.info = "none", cexCol =1.3,
cexRow = 1.3,
Rowv = NA,
margins = c(15,15),
labRow = labvec,
main = "Correlation Matrix Between ACE Score, TBI and Covariates",
scale= "none",col= brewer.pal(8, "Greens"))
I created multiple heat maps with this code several times after I cracked this two months ago. However, it isn't working now. Any help will be appreciated. Thanks so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论