Learn R Programming

mixOmics (version 2.6)

imgCor: Image Maps of Correlation Matrices between two Data Sets

Description

Display two-dimensional visualizations (image maps) of the correlation matrices within and between two data sets.

Usage

imgCor(X, Y, type = c("combine", "separated"), 
       col = jet.colors(64), ...)

Arguments

X
numeric matrix or data frame $(n \times p)$, the observations on the $X$ variables. NAs are allowed.
Y
numeric matrix or data frame $(n \times q)$, the observations on the $Y$ variables. NAs are allowed.
type
character string, (partially) maching one of "combine" or "separated", determining the kind of plots to be produced. See Details.
col
vector of colors such as that generated by heat.colors, topo.colors, rainbow or similar fun
...
not used currently.

encoding

latin1

Details

If type="combine", the correlation matrix is computed of the combined matrices cbind(X, Y) and then plotted. If type="separated", three correlation matrices are computed, cor(X), cor(Y) and cor(X,Y) and plotted separately on the same device. In both cases, a color correlation scales strip is plotted. The correlation matrices are pre-processed before calling the imgCor function in order to get, as in the numerical representation, the diagonal from upper-left corner to bottom-right one.

See Also

cor, image, jet.colors.

Examples

Run this code
data(nutrimouse)
X <- nutrimouse$lipid
Y <- nutrimouse$gene

## 'combine' type plot (default)
imgCor(X, Y)

## 'separate' type plot
imgCor(X, Y, type = "separate")

Run the code above in your browser using DataLab