showAnn {heatmap3}R Documentation

showAnn

Description

The function showAnn is an example for generating annotation figure in the result of heatmap3 function. You can use your any plot functions to generate your own annotation figure.

Usage

showAnn(annData)

Arguments

annData

a data frame contains the annotation information for samples. It can only contain factor or numeric variables, and each row reprezent a sample with the same order of the columns in expression matrix.

Examples

annData<-data.frame(mtcars[,c("mpg","am","wt","gear")])
annData[,2]<-as.factor(annData[,2])
annData[,4]<-as.factor(annData[,4])
#Display annotation
## Not run: 
showAnn(annData)

## End(Not run)
#Heatmap with annotation
heatmap3(t(mtcars),ColSideAnn=annData,ColSideFun=function(x) 
showAnn(x),ColSideWidth=1.2,balanceColor=TRUE)

[Package heatmap3 version 1.1.9 Index]