nMDS: non-Metric Multi-Dimensional Scaling

Description Usage Arguments Details Value Author(s) References See Also Examples

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

1
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

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.

Value

An object of class "nMDS" containing:

x

matrix with the same number of rows and row names as data and having embed.data columns

Author(s)

Satwik Rajaram and Yoshi Oono

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

1
2
3
4
#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))

Example output

Loading required package: ggplot2
Loading required package: rgl
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

NeatMap documentation built on May 2, 2019, 6:53 a.m.