Given a minimal dataset where am looking for the occurrence of a certain motif within a dataset of 500 observations. with_motif represents obervations with the specified motif and without_motif are observations without the motif.
with_motif <- 100 without_motif <- 400 dt <- data.frame(with_motif,without_motif) The following code will plot a bar-chart using ggplot2 library,
bar_plot <- ggplot(melt(dt),aes(variable,value)) + geom_bar() + scale_x_discrete(name="with or without") + theme_bw() + opts( panel.grid.major = theme_blank(),title = "", plot.title=theme_text(size=14)) bar_plot I would like to compute a standard error at 95% CI and attach a barchart to the plot. ggplot offers geom_errorbar() but I would be glad to know different ways for deriving the standard errors(deviation) so as to calculate the errorbar limits(CI).
geom_errorbar()in this response. Is this what you're after? $\endgroup$geom_errorbar(). If your question is about how to compute those estimates, then you may consider updating your question and provide more information on your dataset. $\endgroup$withandwithoutstand for in your code? $\endgroup$