我正在尝试在绘制dandrogram之前为列指定字母。这是代码>
data<-data.frame(X=c(1,2,3,4),Y=c(1,3,2,1))
dataset1<-as.data.frame(as.matrix( dist(data)))
colnames(dataset1) <- c("A","B","C","D")
rownames(dataset1) <- c("A","B","C","D")
plot(hclust(dataset1, method = "single"))
但在最后一行,它抱怨&gt;
Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") :
missing value where TRUE/FALSE needed