[BioC] error under "hclust" for expression data
li.wang at ttu.edu
Wed May 16 00:51:55 CEST 2012
Dear List Members
I am confronted with an error when doing hierarchical clustering for expression value clustering in R.
> d <- dist(n, method="euclidean")
In dist(n, method = "euclidean") : NAs introduced by coercion
> h <- hclust(d, method="ward")
Error in hclust(d, method = "ward") :
NA/NaN/Inf in foreign function call (arg 11)
It seems that the NAs in my raw data affect it.
I tried to remove NAs with the following two ways:
d <- na.omit(d)
d <- d[rowSums(!is.na(d))!=0, colSums(!is.na(d))!=0]
However, they didnot solve the problem.
Any comments and suggestions are very appreciated.
More information about the Bioconductor