[R] How to stack two Stack manhattan plots?

cpoiw@rt m@iii@g oii chemo@org@uk cpoiw@rt m@iii@g oii chemo@org@uk
Thu Jun 11 01:17:24 CEST 2020


What did you expect?

I'm assuming two plots (based on the subject) and side by side based on 
the code (nrow =1)

But you are getting several graphs (facets) on the row and only expected 
2?

What is in CHR?  i.e. summary(tmp1$CHR)

I'm assuming its not a factor with 2 elements...?


>> > 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
>> > ...
>> > ggplot(tmp.tidy, aes(BP, value, color=key)) + geom_point() +
>> > facet_wrap(~CHR, nrow=1)



More information about the R-help mailing list