Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

min.nmds

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

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)

ecodist

Dissimilarity-Based Functions for Ecological Analysis

v2.0.7
GPL (>= 2)
Authors
Sarah Goslee [aut, cre], Dean Urban [aut]
Initial release
2020-08-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.