Learn R Programming

mixOmics (version 5.0-4)

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", "separate"), col = color.jet, 
       X.names = TRUE, Y.names = TRUE,		 
       XsideColor = "blue", YsideColor = "red",
       symkey = TRUE, keysize = 1, interactive.dev = TRUE,		 
       cexRow = NULL, cexCol = NULL, 
       margins = c(5, 5), lhei = NULL, lwid = NULL)

Arguments

X
numeric matrix or data frame $(n$ x $p)$, the observations on the $X$ variables. NAs are allowed.
Y
numeric matrix or data frame $(n$ x $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 funct
X.names
logical, should the name of each data on the axis X be shown ? Possible character vector giving the names of the X-variables.
Y.names
logical, should the name of each data on the axis Y be shown ? Possible character vector giving the names of the Y-variables.
XsideColor
character string. The color name for a horizontal side bar that may be used to annotate the columns of X.
YsideColor
character string. The color name for a vertical side bar that may be used to annotate the rows of Y.
symkey
boolean indicating whether the color key should be made symmetric about 0. Defaults to TRUE.
keysize
positive numeric value indicating the size of the color key.
interactive.dev
boolean. The current graphics device that will be opened is interactive?
cexRow, cexCol
positive numbers, used as cex.axis in for the row or column axis labeling. The defaults currently only use number of rows or columns, respectively.
margins
numeric vector of length two containing the margins (see par(mar)) for column and row names respectively.
lhei, lwid
arguments passed to layout to divide the device up into two rows and two columns, with the row-heights lhei and the column-widths lwid.

encoding

latin1

Details

If type="combine", the correlation matrix is computed of the combined matrices cbind(X, Y) and then plotted. If type="separate", three correlation matrices are computed, cor(X), cor(Y) and cor(X,Y) and plotted separately on a device. In both cases, a color correlation scales strip is plotted.

The correlation matrices are pre-processed before calling the image function in order to get, as in the numerical representation, the diagonal from upper-left corner to bottom-right one.

Missing values are handled by casewise deletion in the imgCor function.

If X.names = FALSE, the name of each X-variable is hidden. Default value is TRUE.

If Y.names = FALSE, the name of each Y-variable is hidden. Default value is TRUE.

See Also

cor, image, color.jet.

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")

## 'separate' type plot without the name of datas
imgCor(X, Y, X.names = FALSE, Y.names = FALSE, type = "separate")

Run the code above in your browser using DataLab