Learn R Programming

IsoplotR (version 0.17)

mds: Multidimensional Scaling

Description

Performs classical or nonmetric Multidimensional Scaling analysis

Usage

mds(x, ...)

# S3 method for default mds(x, classical = FALSE, plot = TRUE, shepard = FALSE, nnlines = FALSE, pos = NULL, col = "black", bg = "white", xlab = "", ylab = "", ...)

# S3 method for detritals mds(x, classical = FALSE, plot = TRUE, shepard = FALSE, nnlines = FALSE, pos = NULL, col = "black", bg = "white", xlab = "", ylab = "", ...)

Arguments

x

a dissimilarity matrix OR an object of class detrital

...

optional arguments to the generic plot function

classical

logical flag indicating whether classical (TRUE) or nonmetric (FALSE) MDS should be used

plot

show the MDS configuration (if shepard=FALSE) or Shepard plot (if shepard=TRUE) on a graphical device

shepard

logical flag indicating whether the graphical output should show the MDS configuration (shepard=FALSE) or a Shepard plot with the 'stress' value. This argument is only used if plot=TRUE.

nnlines

if TRUE, draws nearest neighbour lines

pos

a position specifier for the labels (if pch!=NA). Values of 1, 2, 3 and 4 indicate positions below, to the left of, above and to the right of the MDS coordinates, respectively.

col

plot colour (may be a vector)

bg

background colour (may be a vector)

xlab

a string with the label of the x axis

ylab

a string with the label of the y axis

Value

if plot=FALSE, returns an object of class MDS, i.e. a list containing the following items:

points

a two column vector of the fitted configuration

classical

a logical flag indicating whether the MDS configuration was obtained by classical (TRUE) or nonmetric (FALSE) MDS

diss

the dissimilarity matrix used for the MDS analysis

stress

(only if classical=TRUE) the final stress achieved (in percent)

References

Vermeesch, P., 2013. Multi-sample comparison of detrital age distributions. Chemical Geology, 341, pp.140-146.

Examples

Run this code
# NOT RUN {
data(examples)
mds(examples$DZ,nnlines=TRUE,pch=21,cex=5)
dev.new()
mds(examples$DZ,shepard=TRUE)
# }

Run the code above in your browser using DataLab