showAnn: showAnn

Description Usage Arguments Examples

View source: R/heatmap3.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

slzhao/heatmap3 documentation built on March 6, 2020, 11:43 p.m.