How can I use hclust()
in R when the dataset I am using has NA values? This is the function I have set up:
data2 = apply(data,2, as.numeric)
data2.hclust = hclust(data2, method='median')
When I attempt this I receive this error message:
Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") :
missing value where TRUE/FALSE needed
Is there anyway to use the hclust()
function even with NA values?