ColorCodedPair-class {PreProcess}R Documentation

The ColorCodedPair class

Description

This class represents a vector of (X,y) pairs, each of which should be plotted in a specific color with a specific symbol.

Usage

ColorCodedPair(x, y, ccl)
## S4 method for signature 'ColorCodedPair, missing':
plot(object, ...)

Arguments

x A numeric vector
y A numeric vector
ccl A list of ColorCoding objects
object A ColorCodedPair object
... Additional arguments are as in the underlying generic methods.

Details

It is often necessary with microarray data to produce multiple plots, where each point on the plot corresponds to a gene or a spot on the microarray. Across mutliple plots, we often want to use symbols or colors to mark subsets of he genes with certain properties. The ColorCodedPair class works in tandem with the ColorCoding class to make it easier to maintain consistent plotting conventions across mutliple graphs.

Value

The constructor returns a valid ColorCodedPair object.
The plot method invisibly returns the object being plotted.

Slots

x
A numeric vector
y
A numeric vector
colorCodingList
A list of ColorCoding objects

Methods

plot(object, ...)
Plot the ColorCodedPair object, with appropriate colors and symbols (of course).

Author(s)

Kevin R. Coombes <kcoombes@mdanderson.org>

See Also

The ColorCoding class, colorCode

Examples

theta <- (0:360)*pi/180
x <- cos(theta)
y <- sin(theta)
xp <- x > 0
yp <- y > 0
colors <- list(ColorCoding(xp&yp, COLOR.EXPECTED),
               ColorCoding(xp&!yp, COLOR.OBSERVED),
               ColorCoding(!xp&yp, COLOR.PERMTEST),
               ColorCoding(!xp&!yp, COLOR.FITTED))
plot(ColorCodedPair(x, y, colors))

plot(ColorCodedPair(theta, x, colors))

plot(ColorCodedPair(theta, y, colors),
     xlab='angle in radians', ylab='sine', main='colored sine')


[Package PreProcess version 1.2 Index]