本帖最后由 niutyut 于 2014-6-26 10:02 编辑
require(graphics)
setwd("d:")
eurodist1<- read.csv("book2.csv")
loc <- cmdscale(eurodist1,eig = TRUE)
x <- loc[, 1]
y <- -loc[, 2]
plot(x, y, type = "n", xlab = "", ylab = "", asp = 1, axes = FALSE,
text(x, y, rownames(loc), cex = 0.6)
以上代码出现如下错误。
> loc <- cmdscale(eurodist1,eig = TRUE)
Error in FUN(left, right) : non-numeric argument to binary operator
|