[R] How to stack two Stack manhattan plots?

Ana Marija @okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Wed Jun 10 22:36:11 CEST 2020


Hello,

I have a data frame like this:

> head(tmp1)
  CHR      BP   Pold    Pnew
1   1  785989 0.9521 0.09278
2   1 1130727 0.4750 0.19010
3   1 1156131 0.5289 0.48520
4   1 1158631 0.2554 0.18140
5   1 1211292 0.2954 0.48590
6   1 1478153 0.5542 0.68790
...

I did:
tmp.tidy <- tmp1 %>% gather(key, value, -BP, -CHR)
jpeg("over.jpeg")
ggplot(tmp.tidy, aes(BP, value, color=key)) + geom_point() +
facet_wrap(~CHR, nrow=1)
dev.off()

but I got this plot in attach which doesn't make sense. Can you please
advise how to make this plot?

thanks
Ana

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2020-06-10 at 3.34.47 PM.png
Type: image/png
Size: 311087 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200610/59234ecb/attachment.png>


More information about the R-help mailing list