Question: How to add significance level to correlation heatmap using ggplot2

0

Ana •

**130**wrote:I have generated some correlation heatmaps. I want to know how can I replace r-values in each cell of the plot with the p-value? These value inside the heatmap are correlation coefficients, I want to replace them with the p-values, or have both p-value and r-value in each cell! This is my R-table

```
head(data)
env Chr01 Chr05 Chr11 Chr13_a Chr13_b
1 env1 0.4816731 -0.44170625 0.4635633 0.50192843 -0.56908075
2 env10 0.1311885 0.09209417 0.0499076 -0.01852129 -0.07120534
3 env11 0.2081285 0.01291618 0.1278969 0.06452087 -0.13677310
```

I am using this code

```
heatmap.2(data,col=greenred(10),scale="row", trace="none",cellnote = data)
```

Please do this: How to add images to a Biostars post

62k