Learn R Programming

NeatMap (version 0.1)

nMDS: non-Metric Multi-Dimensional Scaling

Description

Given a matrix, and a distance measure, an embedding of the rows into desired Euclidean space is performed using non-Metric Multi-Dimensional Scaling.

Usage

nMDS(data, embed.dim = 2, n.iters = 300, metric = "pearson",random.seed=NULL)

Arguments

data
matrix whose rows shall be embedded.
embed.dim
Dimensionality of Euclidean space into which embedding shall be performed.
n.iters
Number of iterations of the nMDS scheme
metric
The distance metric used to compare rows. Currently only "pearson" and "euclidean" ae supported.
random.seed
A random seed used by nMDS. Use of this option allows reproducability of nMDS results

Value

  • An object of class "nMDS" containing:
  • xmatrix with the same number of rows and row names as data and having embed.data columns

Details

non-Metric Multi-Dimensional Scaling is performed using the scheme proposed by Taguchi and Oono.

If an element is missing (NA) in a particular row, all distance comparisons to that row shall ignore that particular element.

References

Relational patterns of gene expression via non-metric multidimensional scaling analysis: Y.-h. Taguchi and Y. Oono, Bioinformatics, 2005 21(6):730-740.

See Also

prcomp

Examples

Run this code
#Two dimensional embedding
mtcars.nMDS<-nMDS(as.matrix(mtcars),embed.dim=2,metric="euclidean")
plot(mtcars.nMDS$x,type='n')
text(mtcars.nMDS$x,labels=rownames(mtcars.nMDS$x))

Run the code above in your browser using DataLab