pheatmap:无法访问热图对象
我在访问创建pheatmap
中的对象时遇到了问题。请参阅下面的代码。
library(pheatmap)
set.seed(2020)
mat = matrix(rnorm(200),20,10)
rownames(mat) = paste0("g",1:20)
obj = pheatmap(mat,cluster_cols = FALSE, scale = 'row',cutree_rows = 3)
cl = cutree(obj$tree_row,3)
Error in obj$tree_row : $ operator not defined for this S4 class
> packageVersion("pheatmap")
[1] '1.0.12'
> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
I have a problem accessing the objects in the created pheatmap
. please see below my code.
library(pheatmap)
set.seed(2020)
mat = matrix(rnorm(200),20,10)
rownames(mat) = paste0("g",1:20)
obj = pheatmap(mat,cluster_cols = FALSE, scale = 'row',cutree_rows = 3)
cl = cutree(obj$tree_row,3)
Error in obj$tree_row : $ operator not defined for this S4 class
> packageVersion("pheatmap")
[1] '1.0.12'
> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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