MDSplot: Multi-dimensional Scaling Plot of Proximity matrix from snpRF

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Plot the scaling coordinates of the proximity matrix from snpRF.

Usage

1
MDSplot(rf, fac, k=2, palette=NULL, pch=20, ...)

Arguments

rf

an object of class snpRF that contains the proximity component.

fac

a factor that was used as response to train rf.

k

number of dimensions for the scaling coordinates.

palette

colors to use to distinguish the classes; length must be the equal to the number of levels.

pch

plotting symbols to use.

...

other graphical parameters.

Value

The output of cmdscale on 1 - rf$proximity is returned invisibly.

Note

If k > 2, pairs is used to produce the scatterplot matrix of the coordinates.

Author(s)

Robert Gentleman, with slight modifications by Andy Liaw and modifications for use with snpRF by Greg Jenkins

See Also

snpRF

Examples

1
2
3
4
5
6
7
8
set.seed(1)
data(snpRFexample)
eg.rf <- snpRF(x.autosome=autosome.snps,x.xchrom=xchrom.snps,
               xchrom.names=xchrom.snps.names,x.covar=covariates,
               y=phenotype, proximity=TRUE,keep.forest=FALSE)
MDSplot(eg.rf, phenotype)
## Using different symbols for the classes:
MDSplot(eg.rf, phenotype, palette=rep(1, 2), pch=as.numeric(phenotype))

Example output

snpRF 0.4
Loading required namespace: RColorBrewer
Warning message:
In RColorBrewer::brewer.pal(nlevs, "Set1") :
  minimal value for n is 3, returning requested palette with 3 different levels

snpRF documentation built on May 2, 2019, 6:51 a.m.

Related to MDSplot in snpRF...