I have big datamatrix and I want to learn to set the clustering before drawing heatmap.
> hc <- hclust(as.dist(1-cor(t(mydat1))))
Error in hclust(as.dist(1 - cor(t(mydat1)))) :
NA/NaN/Inf in foreign function call (arg 10)
In addition: Warning message:
In cor(t(mydat1)) : the standard deviation is zero
I have tested the matrix using:
> sumis.na(mydat1))
[1] 0
> sum(is.nan(mydat1))
[1] 0
> sum(is.infinite(mydat1))
[1] 0
What happened in my situation? It looks that the warning is that the standard deviation is zero. What does it mean, will it affect the following steps?
If warning is a big issue why not set it as error?
Thanks
Thank you very much for your comments. It looks that I need to learn some mathematics. I was trying to understand how to use different way to cluster the gene expression level. I know some methods like pearson/speraman but I cannot understand them. Also R learning is still not there yet.
Thank you again