2
我想繪製一個相關圖。
features = features[,-2]
features<- scale(features[2:ncol(features)],center=TRUE,scale=TRUE);
correlationmatrix <- cor(features)
corrplot(correlationmatrix, order = "hclust")
直到第三行,一切工作正常。當運行corrplot,我有:
Error in if (min(corr) < -1 - .Machine$double.eps || max(corr) > 1 + .Machine$double.eps) { :
missing value where TRUE/FALSE needed
請給出您的數據的一個樣本,使[可重現的例子](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)。 – tonytonov