plot.MCRestimate: Plot method for a objects of class MCRestimate

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot.MCRestimate.R

Description

plot.MCRestimate visualizes a 'vote matrix'. A 'vote matrix' is the result of a classification procedure. For every sample (=row) i and every class (=column) j the matrix element [i,j] is the probability or frequency the classification method predicts sample i as a member of class j.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'MCRestimate'
plot(x,
                 class.factor=NULL,
                 rownames.from.object=FALSE,
                 sample.order=TRUE,
                 legend=FALSE,
                 mypalette=NULL,
                 shading=NULL,
                 xlab="Sample ID",
                 ylab="Frequency of correct classification",
                 cex.axis=1,...)

Arguments

x

Object of S3 class MCRestimate or a matrix

class.factor

Factor. Its length must match the number of rows in x and the levels must be the same as the colnames in x. If x is of class MCRestimate this argument will be ignored.

rownames.from.object

Logical. If TRUE then the rownames of the matrix or the sample names of MCRestimate in x are used as labels for the x-axis

sample.order

Logical. If TRUE then the samples are ordered by class membership

legend

Logical. If TRUE then there will be a small legend in the output

mypalette

vector with length equal to the number of classes. The vector specifies the color for the bar representing the classes. If 'NULL' colors chosen by the author are used.

shading

the density of shading lines for the rectangles that indicate the groups, in lines per inch. The default value of 'NULL' means that no shading lines are drawn.

xlab

Character

ylab

Character

cex.axis

numeric

...

Further arguments that are passed on to plot.default

Value

The function is called for its side effect, creating a plot on the active graphics device.

Author(s)

Markus Ruschhaupt mailto:m.ruschhaupt@dkfz.de

See Also

MCRestimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  x <- c(0.5, 0.3, 0.7, 0.3, 0.8, 0.2, 0.3)
  mat2 <- cbind(x, 1-x)
  fac2 <- factor(c("low", rep("high", 3), rep("low", 3)))
  colnames(mat2) <- levels(fac2)

  mat3 <- cbind(x/3, 2*x/3, 1-x)
  fac3 <- factor(c(rep("high", 3), rep("intermediate", 2), rep("low", 2)))
  colnames(mat3) <- levels(fac3)
if (interactive()) {
  x11(width=9, height=9)
  par(mfrow=c(3,1))}
  plot.MCRestimate(mat2, fac2)
  plot.MCRestimate(mat2, fac2, sample.order=FALSE)
  plot.MCRestimate(mat3, fac3)

MCRestimate documentation built on Oct. 31, 2019, 10:29 a.m.