Skip to content
Prev 248551 / 398506 Next

agnes clustering and NAs

On Thu, 2011-01-27 at 10:45 +0100, Uwe Ligges wrote:
If one believes the documentation, then that only applies to the case
where `x` is a dissimilarity matrix. `NA`s are allowed if x is the raw
data matrix or data frame.

The only way the OP could have gotten that error with the call shown is
if iMatrix were not a dissimilarity matrix inheriting from class "dist",
so `NA`s should be allowed.

My guess would be that the OP didn't get rid of all the `NA`s.

Dario: what does:

sapply(iMatrix, function(x) any(is.na(x)))

or if iMatrix is a matrix:

apply(iMatrix, 2, function(x) any(is.na(x)))

say?

G