min.nmds: Find minimum stress configuration

View source: R/min.nmds.R

min.nmdsR Documentation

Find minimum stress configuration

Description

Finds minimum stress configuration from output of nmds()

Usage

## S3 method for class 'nmds'
min(..., na.rm = FALSE, dims = 2)
nmds.min(x, dims = 2)

Arguments

...

output from nmds()

x

output from nmds()

dims

desired dimensionality of result. If dims = 0 then the overall minimum stress configuration is chosen. By default, the best two-dimensional configuration is returned.

na.rm

Not used; there should be no NA values in a NMDS configuration.

Details

For back-compatibility, the nmds.min function remains.

Value

Configuration of minimum stress ordination (dataframe of coordinates). The stress and r^2 for the minimum stress configuration are stored as attributes.

Author(s)

Sarah Goslee

See Also

nmds

Examples


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)


phiala/ecodist documentation built on Nov. 5, 2023, 10:47 a.m.