[BioC] Why daisy() in cluster library failed to exclude NA when computing dissimilarity

Gundala Viswanath gundalav at gmail.com
Sun Dec 8 08:11:12 CET 2013


According to daisy function from cluster documentation, it can compute
dissimilarity when NA (missing) value(s) is present.


But why when I tried this code

x <- c(1.115,NA,NA,0.971,NA)
y <- c(NA,1.006,NA,NA,0.645)
df <- as.data.frame(rbind(x,y))

It gave this message:

Dissimilarities :
y NA

Metric :  mixed ;  Types = I, I, I, I, I
Number of objects : 2
Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf

I welcome other alternative than gower.

I expect the dissimilarity output gives a non-NA value e.g. 0. What's
the right way to do it?


More information about the Bioconductor mailing list