heatMaps {FRESA.CAD}R Documentation

Plot a heat map of selected variables

Description

This function creates a heat map for a data set based on a univariate or frequency ranking

Usage

	heatMaps(variableList=NULL,
	         varRank = NULL,
	         Outcome,
	         data,
	         title = "Heat Map",
	         hCluster = FALSE,
	         prediction = NULL,
	         Scale = FALSE,
	         theFiveColors=c("blue","cyan","black","yellow","red"),
	         outcomeColors = c("blue","lightgreen","yellow","orangered","red"),
	         transpose=FALSE,
	         ...)

Arguments

variableList

A data frame with two columns. The first one must have the names of the candidate variables and the other one the description of such variables

varRank

A data frame with the name of the variables in variableList, ranked according to a certain metric

Outcome

The name of the column in data that stores the variable to be predicted by the model

data

A data frame where all variables are stored in different columns

title

The title of the plot

hCluster

Logical. If TRUE, variables will be clustered

prediction

A vector with a prediction for each subject, which will be used to rank the heat map

Scale

An optional value to force the data normalization outcome

theFiveColors

the colors of the heatmap

outcomeColors

the colors of the outcome bar

transpose

transpose the heatmap

...

additional parameters for the heatmap.2 function

Value

dataMatrix

A matrix with all the terms in data described by variableList

orderMatrix

A matrix similar to dataMatrix, where rows are ordered according to the outcome

heatMap

A list with the values returned by the heatmap.2 function (gplots package)

Author(s)

Jose G. Tamez-Pena and Antonio Martinez-Torteya

Examples

	## Not run: 

		library(rpart)
		data(stagec)

		# Set the options to keep the na
		options(na.action='na.pass')
		# create a model matrix with all the NA values imputed
		stagecImputed <- as.data.frame(nearestNeighborImpute(model.matrix(~.,stagec)[,-1]))

		# the simple heat map
		hm <- heatMaps(Outcome="pgstat",data=stagecImputed,title="Heat Map",Scale=TRUE) 

		# transposing the heat-map with clustered colums
		hm <- heatMaps(Outcome="pgstat",data=stagecImputed,title="Heat Map",Scale=TRUE,
					   transpose= TRUE,hCluster = TRUE,
					   cexRow=0.80,cexCol=0.50,srtCol=35) 

		# transposing the heat-map with reds and time to event as outcome
		hm <- heatMaps(Outcome="pgtime",data=stagecImputed,title="Heat Map",Scale=TRUE,
					   theFiveColors=c("black","red","orange","yellow","white"),
					   cexRow=0.50,cexCol=0.80,srtCol=35) 
	
## End(Not run)

[Package FRESA.CAD version 3.4.8 Index]