data(iris)
iris.d <- dist(iris[,1:4])
### nmds() is timeconsuming, so this was generated
### in advance and saved.
### set.seed(1234)
### iris.nmds <- nmds(iris.d, nits=20, mindim=1, maxdim=4)
### save(iris.nmds, file="ecodist/data/iris.nmds.rda")
data(iris.nmds)
# examine fit by number of dimensions
plot(iris.nmds)
# choose the best two-dimensional solution to work with
iris.nmin <- min(iris.nmds, dims=2)
Run the code above in your browser using DataLab