Learn R Programming

RRF (version 1.9.4)

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

Description

Plot the scaling coordinates of the proximity matrix from RRF.

Usage

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

Arguments

rf

an object of class RRF 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

RRF

Examples

Run this code
# NOT RUN {
set.seed(1)
data(iris)
iris.rf <- RRF(Species ~ ., iris, proximity=TRUE,
                        keep.forest=FALSE)
MDSplot(iris.rf, iris$Species)
## Using different symbols for the classes:
MDSplot(iris.rf, iris$Species, palette=rep(1, 3), pch=as.numeric(iris$Species))
# }

Run the code above in your browser using DataLab