0

I have a following table:

Samples      Mean1  Mean2 Diff
   A          125    250    2
   B          100    200    2
   C          150     75   -2
   D          50     150   -3

Now I want to generate a heatmap where the color code blocks should represent mean values while the legend should represents the maximum and minimum value of column "Diff" with respect to the mean values in heatmap...I tried pheatmap package in R but the legend comes purely based on the mean values i.e the maximum value is 250 and the minimum value is 50 but I want with respect to corresponding values in Diff Column i.e the minimum value is -3 and the maximum value is 2..

Can Anyone assist me

4

1 回答 1

0

当我理解正确时,您希望单元格(和图例)的颜色代表“DIFF”列值吗?你想在单元格中显示平均值吗?

例如如下面的截图所示?

在此处输入图像描述

您可以使用( package) 中的cellnote参数来执行此操作。cellnote 值独立于您用于“着色”单元格的值。heatmap.2()gplots

于 2013-07-16T15:31:26.043 回答