.BG
.FN cmdscale
.TL
cmdscale: Classical Metric Multi-dimensional Scaling
.CS
cmdscale(d, k, eig, add)
.PP
.AG d
distance matrix structure of the form returned by `dist' or a full, symmetric 
matrix.  Data is assumed to be dissimilarities or relative distances. 
.AG k
desired dimensionality of the output space.  Default 2.
.AG eig
logical flag which controls return of eigenvalues computed by the algorithm.
They can be used as an aid in determining the appropriate
dimensionality of the solution.
Default FALSE.
.AG add
logical flag which controls computation of additive constant
(see component `ac' below); default FALSE.
.RT
a structure potentially with three
components named `points', `eig' and `ac'.
.RC points
a matrix with `k' columns and as many rows as there were
objects whose distances were given in `d'.  Row i gives the
coordinates in `k'-space of the i-th object.
.RC eig
vector of eigenvalues (as many as original data points), returned only
if argument `eig' is TRUE.
.RC ac
constant added to all data values in `d' to transform dissimilarities
(or relative distances) into absolute distances.
The Unidimensional Subspace procedure,
(Torgerson, 1958, p.276) is used to determine the additive constant.
.SH REFERENCE
Warren S. Torgerson, 
.ul
Theory and Methods of Scaling,
pp. 247-297, Wiley, 1958.
.EX
x<-cmdscale(dist)  #default 2-space
coord1<-x[,1]; coord2<-x[,2]
par( pty="s" )  #set up square plot
r<-range(x)   #get overall max, min
plot(coord1,coord2,type="n",xlim=r,ylim=r) #set up plot
   # note units per inch same on x and y axes
text(coord1,coord2,seq(coord1))  #plot integers
.KW multi-dimensional scaling
.KW multivariate
.KW scaling
.KW array*
.WR
