Composing a matrix for 'heatmap' from original dataset and genetic data analysis.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Composing a matrix for 'heatmap' from original dataset and genetic data analysis.


I have following data:
doze g1 g2 g3 g4 etc...
1200 a d
1100 b e
1158 c f
1500 a e
1403 c f

Doze - numeric, levels(g1)=c('a','b','c'), levels(g2)=c('d','e','f').

This is the data of genetic analysis, where the factors are genes and
the numerical is some numerical value.

I want to build up a function, which will do a preliminary data
visualization based on factor levels combination and mean doze for that

The best way to do it, as I think, is to build a tree which divides at
the "stage 1" into the levels of factor 1, then on the "stage 2" into
the levels of factor two etc. And in the end it will be mean doze for
this branch. What I found was only 'ctree', this can only bifurcate, I'm
not sure it fits much. What's the convenient way to visualize such kind
of data in R?

I think 'heatmap' for any two factors I give to it with text mean labels
(how to add them?) would be nice solution. So that's the way I wrote

zar <- function(g1,g2,param='doz') {

#to make a matrix for 'heatmap', is it necessary?
#data labels are not preserved in this expression, badly!

for (i in lg1) {
        for (j in lg2) {
heatmap(-f, Rowv=NA, Colv=NA, margins=c(10,10),main=param)

Please, make a hint to me for how to do this task easier and more
how to add text labels to 'heatmap'
and is this way right?


[hidden email] mailing list
PLEASE do read the posting guide!