0
我可以使用palette()
沿着热图的行和列设置颜色标签吗? 我做一个随机4x4矩阵,绘制热图,并尝试设置侧面颜色:R - 热图,设置ColSideColors
m <- matrix(rnorm(16), 4, 4)
c <- c(1,1,2,2)
heatmap(m,ColSideColors=c)
,我得到的错误:
"Error in heatmap(m, ColSideColors = c) :
'ColSideColors' must be a character vector of length ncol(x)"
您在错误消息中有答案。查看'class(c)'的结果。并且请避免使用'c'作为变量的名称。 – 2015-04-07 08:27:54