Display heatmaps and heatvectors.

Share:

Description

Quickly see the overall pattern of a variable in the terminal.

Usage

1
heat.view(x, pal, range, mark = NULL)

Arguments

x

Vector to be displayed.

pal

Palette. Either the name of a palette defined in xterm.pal or an integer vector with color indices (see display.xterm.colors).

range

The numerical range which the palette describes. See discrete.color for more info.

mark

Single letter marks to be displayed on top of the color.

Value

Nothing

Author(s)

Christofer B├Ącklin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(iris)
heat.view(iris$Species)
heat.view(matrix(iris$Petal.Width, 3, 50, byrow=TRUE,
                 dimnames=list(levels(iris$Species), NULL)), pal="purples")

run.status <- factor(runif(100) < .95, labels=c("Fail", "Pass"))
heat.view(run.status, pal=1:2)

#Tip for displayig the element names of a named vector:
a <- runif(7)
names(a) <- c("ATM", "CHK1", "CDC25", "p53", "CDC2", "CDK2", "CDK4")
heat.view(a)            # No names displayed
heat.view(as.matrix(a)) # Names displayed