MDScols: MDS by columns and optional plot using Minkowski metrics

Description Usage Arguments Value TODO

Description

Parametric (stats::cmdscale()) and non-parametric MDS (MASS::isoMDS() or MASS::sammon()) Data may be scales and/or centered before distance calculation. Distances are calculated between columns on a (possibly subset) of rows. Similar to limma::plotMDS in terms of subseting rows, but it allows for all rows for distance calculation, while limma uses only top=XX genes

Uses MASS::isoMDS or MASS::sammon Similar to limma::plotMDS, except that is uses all parameters for distance calculation, while limma uses only top=XX genes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
MDScols(
  data,
  scale = FALSE,
  center = FALSE,
  FUN = "isoMDS",
  p = 2,
  selection = "pairwise",
  top = 500,
  k = 2,
  maxit = 50,
  trace = TRUE,
  tol = 1e-04,
  plot = FALSE,
  labels = names(data),
  col = NULL,
  cex = 1,
  main = NULL,
  cex.main = 1,
  xlab = "Coordinate 1",
  ylab = "Coordinate 2",
  ...
)

MASS_MDScols(
  data,
  scale = FALSE,
  center = FALSE,
  method = "euclidean",
  FUN = "isoMDS",
  p = 2,
  k = 2,
  maxit = 50,
  trace = TRUE,
  tol = 0.001,
  plot = FALSE,
  labels = names(data),
  col = NULL,
  cex = 1,
  main = NULL,
  cex.main = 1,
  xlab = "Coordinate 1",
  ylab = "Coordinate 2",
  ...
)

plotIsoMDS(FUN = "isoMDS", plot = TRUE, selection = NULL, ...)

Arguments

data

Matrix-like object to MDS (and plot) distances between columns

scale

Logical scale data; standardize together with center

center

Logical center data; standardize together with scale

FUN

MDS function from MASS, default "isoMDS", alternative "sammon"

p

Power of the Minkowski distance, passed to distance calculation dist(...) and isoMDS(...)

selection

Character "pairwise" or "common" for selection of rows or NULL for using all rows; default "pairwise"

top

Integer number of rows for distance calculation, default 500

k

Desired dimension for the solution, passed to cmdscale(...) through FUN

maxit

Max number of iterations, passed to isoMDS(maxit) or sammon(niter = maxit),

trace

Print trace, passed to FUN(),

tol

Tolerance, passed to FUN(),

plot

Logical, plot using R, default FALSE

labels

Character vector of alternative column names, default names(data)

col

Colors of labels

cex

Size of labels

main

String or TRUE to generate title generated automatically; default NULL

cex.main

Size of title

xlab

a label for the x axis, defaults to a description of x.

ylab

a label for the y axis, defaults to a description of y.

...

other graphical parameters (see par and section ‘Details’ below).

method

Distance metrics, passed to dist(...), must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski"

Value

A k-column vector of the fitted configuration from FUN()

A k-column vector of the fitted configuration from FUN()

TODO

add parameter dim.plot


peterjuv/myHelpers documentation built on June 12, 2021, 1:44 p.m.