kat = read.table("Pred.txt",dec=",",header = T) head(kat) d<-dist(kat,method="binary") cl<-hclust(d) plot(cl) sc<-cmdscale(d,eig=TRUE, k=2) # k is the number of dim sc # view results x<-sc$points[,1] y<-sc$points[,2] plot(x, y, xlab="Dim 1", ylab="Dim 2", main="Metrické MDS", type="n") text(x, y, labels = row.names(kat), cex=.7) install.packages("clipr") library(clipr) x <- readClipboard() kat <- read_clip_tbl() # Nonmetric MDS # N rows (objects) x p columns (variables) # each row identified by a unique row name library(MASS) d <- dist(mydata) # euclidean distances between the rows fit <- isoMDS(d, k=2) # k is the number of dim fit # view results # plot solution x <- fit$points[,1] y <- fit$points[,2] plot(x, y, xlab="Coordinate 1", ylab="Coordinate 2", main="Nonmetric MDS", type="n") text(x, y, labels = row.names(mydata), cex=.7)