[R] heat map labeling

Jim Lemon drjimlemon at gmail.com
Fri Aug 28 12:16:27 CEST 2015


Hi Angela,
Assuming the above data frame is named angela.df:

angela.mat<-as.matrix(angela.df[,2:3])
angela.mat<-angela.mat[apply(angela.mat,1,function(x) all(x) > 0),]

will remove all of the rows that have contain at least one zero.

Jim


On Fri, Aug 28, 2015 at 9:00 AM, Angela via R-help <r-help at r-project.org>
wrote:

> Hello,
>
> I have a dataset of 985 genes, looks something like the ones below. I want
> to label only those with the high intensities, since labeling all doesn't
> show up. Is there a way to do that? If not, is there a way to pull out the
> highest ones (say, highest 50, or those above X amount) and only show those
> in a heat map? Thanks!
>
> -Angela
>
> Z transforming gives all cells the same value, just + or - (for example,
> all have 0.5 and -0.5). The researchers want the actual values used.
>
> Gene   var1       var2
> A       8000000 0
> B       250000  300000
> C       750000  2000000
> D       0               0
> E       4000000 6000000
> E       5000000 700000
> E       1000000 1000000
> F       6000000 6000000
> F       700000  827460
> G       420930  400000
> H       0               0
> H       1000000 1000000
> I       700000  600000
> J       0               700000
> K       0               0
> L       200000  500000
> L       1000000 3000000
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list