Hi All

I am trying to cluster 57 COGs in 24 datasets. I use the following code and
run into this error:

hc = NULL
hc <- hclust(as.dist(1-cor(as.matrix(bb), method="spearman")),
method="complete", members=NULL)

Error in hclust(as.dist(1 - cor(as.matrix(bb), method = "spearman")),  :
  NA/NaN/Inf in foreign function call (arg 11)
In addition: Warning message:
In cor(as.matrix(bb), method = "spearman") : the standard deviation is zero

hr = NULL
hr <- hclust(as.dist(1-cor(t(as.matrix(bb)), method="spearman")),
method="complete", members=NULL)

I tried to remove any rows that have sd of zero but there was none;
ind <- apply(bb, 1, var) == 0
subset <- bb[!ind,]

or

ind <- apply(bb, 1, sd) == 0
subset <- bb[!ind,]


any clue what coule the problem be ?

Thanks a lot for your help
yours,
Alyaa
-- 
Alyaa Mahmoud

"Love all, trust a few, do wrong to none"- Shakespeare

	[[alternative HTML version deleted]]

