iris.dist <- dist(unique(iris[, -5]), method="manhattan")
iris.cmd <- cmdscale(iris.dist)
MDSv(iris.cmd)
iris.p <- prcomp(iris[, -5])
MDSv(iris.p$x)
100*summary(iris.p)$importance[2, ] # compare with MDSv() results
Run the code above in your browser using DataLab