[R] GGplot annotate by facet
jrkrideau at inbox.com
Sat Sep 10 14:42:21 CEST 2016
Please have a look at
for some suggestions on how to ask a question on R-help
In particular it would be handy to have some sample data in dput() format.
I always mess up geom_bar() calls and at the moment don't understand exactly what you are doing here qplot(factor(Value),data=dat1,
Kingston ON Canada
> -----Original Message-----
> From: smk5g5 at mail.missouri.edu
> Sent: Sat, 10 Sep 2016 01:55:18 +0000
> To: r-help at r-project.org
> Subject: [R] GGplot annotate by facet
> I have a dataframe which I need to plot in ggplot2 it looks like this :-
> Value Type Histone
> 1 0.06 high H3K27ac
> 2 0.12 low H3K27ac
> 4 0.04 high H3K27me3
> 5 0.16 low H3K27me3
> 7 0.02 high H3K36me3
> 8 0.13 low H3K36me3
> I have another data frame with p-v alues that looks like this :-
> Histone count pvalues
> 1 H3K9ac 0 0.000
> 2 H3K27me3 0 0.000
> 3 H3K36me3 1000 1.000
> 4 H3K4me3 583 0.583
> 5 H3K4me1 882 0.882
> 6 H3K27ac 970 0.970
> This is how I plot the first dataframe using ggplot
> p <-
> Next I need to annotate p-values (p <= mypval_df$pvalues) to each facet
> using the mypval_df.
> I can't seem to find an example on how to do it. Would appreciate any
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
More information about the R-help