myImagePlot {fabia} | R Documentation |
myImagePlot
: R implementation of myImagePlot
.
myImagePlot(x,xLabels=NULL, yLabels=NULL, zlim=NULL, title=NULL)
x |
the matrix. |
xLabels |
vector of strings to label the columns (default "colnames(x)"). |
yLabels |
vector of strings to label the rows (default "rownames(x)"). |
zlim |
vector containing a low and high value to use for the color scale. |
title |
title of the plot. |
Plotting a table of numbers as an image using R.
The color scale is based on the highest and lowest values in the matrix.
Program has been obtained by http://www.phaget4.org/R/myImagePlot.R
http://www.phaget4.org/R/myImagePlot.R
#--------------- # TEST #--------------- dat <- make_fabi_data_blocks(n = 100,l= 50,p = 3,f1 = 5,f2 = 5, of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0, sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0) X <- dat[[1]] Y <- dat[[2]] myImagePlot(Y) x11() myImagePlot(X) ## Not run: #--------------- # DEMO #--------------- dat <- make_fabi_data_blocks(n = 1000,l= 100,p = 10,f1 = 5,f2 = 5, of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0, sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0) X <- dat[[1]] Y <- dat[[2]] X <- X- rowMeans(X) XX <- (1/ncol(X))*tcrossprod(X) dXX <- 1/sqrt(diag(XX)+0.001*as.vector(rep(1,nrow(X)))) X <- dXX*X myImagePlot(X) ## End(Not run)