Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How can I plot bar graph with mean and sd for two group and anothor graph of confidence interval with p -value? [closed]

$
0
0

Here is my data original format.

"Pathway","avg(Ctrl)","sd(Ctrl)","avg(treatment)","sd(treatment)","p.value","q.values","interval lower","interval upper"

"PWY-6507",0,0,0.127694260841528,0.101711179454422,0.00325409384720662,0.0179212067342468,-0.200454055478671,-0.0549344662043858

"PWY-7371",0.116193777204578,0.0913998880919357,0.0274222150572304,0.0255258593682822,0.0137770634364175,0.0332413793324701,0.02225010429477,0.155293019999926

"PWY-7374",0.0292257778494277,0.0239591910385793,0.00704296308237949,0.00814090191942398,0.0180860562636109,0.0349105139661559,0.00458044405814024,0.0397851854759562

I would like to plot bar graphs like this.

enter image description here

These two graphs should be plotted separately, I tried to transit the format into this, and use the code to plot, the bar is not what I want.

library(dplyr)   library(ggplot2)df <- treat_Ctrl_psig_melt %>%   group_by(group) %>%   summarise(m = avg,stdv = sd) ggplot(df, aes(group,m,fill=group)) +  geom_bar(stat="identity", color="black", position=position_dodge()) +  geom_errorbar(aes(ymin=m-stdv, ymax=m+stdv), width=.2, position=position_dodge(.9))

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>