Performs classical or nonmetric Multidimensional Scaling analysis
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 = "", ...)
a dissimilarity matrix OR an object of class
detrital
optional arguments to the generic plot
function
logical flag indicating whether classical
(TRUE
) or nonmetric (FALSE
) MDS should be used
show the MDS configuration (if shepard=FALSE
) or
Shepard plot (if shepard=TRUE
) on a graphical device
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
.
if TRUE
, draws nearest neighbour lines
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.
plot colour (may be a vector)
background colour (may be a vector)
a string with the label of the x axis
a string with the label of the y axis
if plot=FALSE
, returns an object of class
MDS
, i.e. a list containing the following items:
a two column vector of the fitted configuration
a logical flag indicating
whether the MDS configuration was obtained by classical
(TRUE
) or nonmetric (FALSE
) MDS
the dissimilarity matrix used for the MDS analysis
(only if classical=TRUE
) the final stress
achieved (in percent)
Vermeesch, P., 2013. Multi-sample comparison of detrital age distributions. Chemical Geology, 341, pp.140-146.
# 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