# NOT RUN {
# }
# 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)
# }
Run the code above in your browser using DataLab