美文网首页
Error in hclust(d, method = meth

Error in hclust(d, method = meth

作者: 一车小面包人 | 来源:发表于2024-07-21 14:01 被阅读0次

记录一个小bug:
使用pheatmap绘制热图时,使用scale参数总报错:


image.png

只需要删除原始数据中标准差为0的行即可:

top_de_exp<-top_de_exp[apply(top_de_exp,1,function(x){sd(x)!=0}),]

原因是scale对每行进行以下处理:


image.png

其分母(每行的标准差)不能为0

相关文章

网友评论

      本文标题:Error in hclust(d, method = meth

      本文链接:https://www.haomeiwen.com/subject/dvishjtx.html