Learn R Programming

qtlcharts (version 0.16)

iheatmap: Interactive heat map

Description

Creates an interactive heatmap, with each cell linked to plots of horizontal and vertical slices

Usage

iheatmap(z, x = NULL, y = NULL, chartOpts = NULL, digits = 5)

Arguments

z

Numeric matrix of dim `length(x)` x `length(y)`

x

Vector of numeric values for the x-axis

y

Vector of numeric values for the y-axis

chartOpts

A list of options for configuring the chart (see the coffeescript code). Each element must be named using the corresponding option.

digits

Round data to this number of significant digits before passing to the chart function. (Use NULL to not round.)

Value

An object of class `htmlwidget` that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings.

Details

By default, the z-axis limits are from `-max(abs(z))` to `max(abs(z))`, and negative cells are colored blue to white which positive cells are colored white to red.

See Also

[iplotCorr()]

Examples

Run this code
# NOT RUN {
n <- 101
x <- y <- seq(-2, 2, len=n)
z <- matrix(ncol=n, nrow=n)
for(i in seq(along=x))
    for(j in seq(along=y))
        z[i,j] <- x[i]*y[j]*exp(-x[i]^2 - y[j]^2)
# }
# NOT RUN {
iheatmap(z, x, y)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab