snpRF (version 0.4)

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

Description

Plot the scaling coordinates of the proximity matrix from snpRF.

Usage

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.

See Also

snpRF

Examples

Run this code
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))

Run the code above in your browser using DataLab