# NOT RUN {
# generate data
X <- rbind(matrix(rnorm(100),nr=10),matrix(rnorm(100),nr=10)+10)
## 1. projection onto 2 dimension.
output <- do.mds(X,ndim=2)
plot(output$Y[,1],output$Y[,2])
## 2. different preprocessing leads to different results
output2 <- do.mds(X,ndim=2,preprocess="decorrelate")
output3 <- do.mds(X,ndim=2,preprocess="whiten")
par(mfrow=c(1,3))
plot(output$Y[,1],output$Y[,2],main="center")
plot(output2$Y[,1],output2$Y[,2],main="decorrelate")
plot(output3$Y[,1],output3$Y[,2],main="whiten")
# }
Run the code above in your browser using DataLab