## S3 method for class 'default':
cim(mat, breaks, col = jet.colors, 
    distfun = dist, hclustfun = hclust,
    dendrogram = c("both", "row", "column", "none"),
    labRow = NULL, labCol = NULL,
    ColSideColors = NULL, RowSideColors = NULL,		 
    symkey = TRUE, keysize = 1, zoom = FALSE, 
    main = NULL, xlab = NULL, ylab = NULL, 
    cexRow = min(1, 0.2 + 1/log10(nr)), 
    cexCol = min(1, 0.2 + 1/log10(nc)), 
    margins = c(5, 5), lhei = NULL, lwid = NULL, ...)
			
## S3 method for class 'rcc':
cim(object, comp = 1, X.names = NULL, Y.names = NULL, \ldots)
## S3 method for class 'spls':
cim(object, comp = 1, X.names = NULL, Y.names = NULL, 
    keep.var = TRUE, \ldots)
## S3 method for class 'pls':
cim(object, comp = 1, X.names = NULL, Y.names = NULL, \ldots)"rcc", "pls" or "spls".comp = 1.TRUE only the variables with loadings not zero are plotted
    (as selected by spls). Defaults to TRUE.dist.mat into colors, or a integer number of break points to be used, in 
	which case the break points will be spaced equally between min(mat) 
	anterrain.colors, topo.colors, 
	rainbow<hclust. Should take as argument a result of distfun and return 
    an object to which "none", "row", 
    "column" or "both" dendrograms. Defaults to "both".rownames(mat).colnames(mat).ncol(mat) containing 
    the color names for a horizontal side bar that may be used to annotate the columns of mat.nrow(mat) containing the color 
    names for a vertical side bar that may be used to annotate the rows of mat.TRUE.cex.axis in for the row or column 
	axis labeling. The defaults currently only use number of rows or columns, respectively.par(mar)) 
	for column and row names respectively.layout to divide the device up into two 
    rows and two columns, with the row-heights lhei and the column-widths lwid.cim.default.cim.order.dendrogram.order.dendrogram."dendrogram" which describes the row and 
	column trees produced by cim.image(t(mat))) with a dendrogram added to the 
left side and to the top. The rows and columns are reordered according to some hierarchical
clustering method to identify interesting patterns. By default the used clustering method for
rows and columns is the complete linkage method and the used distance measure is the distance
euclidean.  
 
In rcc method, the matrix mat is created where element $(j,k)$ is the
scalar product value between every pairs of vectors in dimension length(comp) representing 
the variables $X_j$ and $Y_k$ on the axis defined by $Z_i$ with $i$ in comp, 
where $Z_i$ is the equiangular vector between the $i$-th $X$ and $Y$ canonical variate. 
In spls, if object$mode is regression, the element $(j,k)$ of the similarity matrix 
mat is given by the scalar product value between every pairs of vectors in dimension length(comp) 
representing the variables $X_j$ and $Y_k$ on the axis defined by $U_i$ with $i$ in comp, 
where $U_i$ is the $i$-th $X$ variate. If object$mode is 
canonical then $X_j$ and $Y_k$ are represented on the axis defined by $U_i$ and $V_i$ 
respectively.
For visualization of "high-dimensional" data sets, a nice zooming tool was created. 
zoom=TRUE open a new device, one for CIM, one for zoom-out region and
define an interactive `zoom' process: click two points at imagen map region by pressing 
the first mouse button. It then draws a rectangle around the selected region and zoom-out 
this at new device. The process can be repeated to zoom-out other regions of interest. 
The zoom process is terminated by clicking the second button and selecting 'Stop' 
from the menu, or from the 'Stop' menu on the graphics window.image, heatmap, hclust, plotVar, 
plot3dVar, network and http://www.math.univ-toulouse.fr/~biostat/mixOmics/ for more details.## default method
data(nutrimouse)
X <- nutrimouse$lipid
Y <- nutrimouse$gene
cim(cor(X, Y), dendrogram = "none")
## CIM representation for objects of class 'rcc'
nutri.res <- rcc(X, Y, ncomp = 3, lambda1 = 0.064, lambda2 = 0.008)
dends <- cim(nutri.res, comp = 1:3, xlab = "genes", 
             ylab = "lipids", margins = c(5, 6))
op <- par(mar = c(5, 4, 4, 4), cex = 0.8)			 
plot(dends$ddr, axes = FALSE, horiz = TRUE)
par(op)
## interactive 'zoom' 
cim(nutri.res, comp = 1:3, zoom = TRUE)
## select the region and "see" the zoom-out region
## CIM representation for objects of class 'spls'
data(liver.toxicity)
X <- liver.toxicity$gene
Y <- liver.toxicity$clinic
toxicity.spls <- spls(X, Y, ncomp = 3, keepX = c(50, 50, 50), 
                      keepY = c(10, 10, 10))
cim(toxicity.spls, comp = 1:3)Run the code above in your browser using DataLab