Take a look at the 'plotmeans' function in the gregmisc library.  It will
draw the means and error bars for you, allowing you to connect the means for
the paired control and treated groups with something like this:

<R code>
# sample source data 10 replicates for each enzyme for treated and control
x <- rnorm(60)
enzyme <- rep(c("ABC123", "ABD124", "CCF342"), length=60)
treat  <- rep(c("CONTROL","TREATED"), length=60)

# create a enzyme by treatment label
group <- interaction(enzyme, treat)

# plot the means and confidence intervals
library(gregmisc)
plotmeans( x ~ group, connect=list(1:2,3:4,5:6))

# add p-values
data <- data.frame(x, enzyme, treat)
p.vals <- by( data, enzyme, function(data) t.test( x ~ treat,
data=data)$p.value )
text(x=c(1.5, 3.5, 5.5), y=rep(0,3), paste("P-value:\n",
format.pval(p.vals)) )
</R code>
 
-Greg

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: [R] beginner's question: Graphical presentation of t test
> 
> 
> Hi,
> 
> Is there any way to use R to present t test results for three 
> groups of 
> experiments, each of which involves several parallel 
> experiment series with 
> groups of control vs treated. I would like to present the 
> average fold change 
> of the experimental parameter (concentration of enzymes) as bars with 
> standard error and the p value above the bar. So, there 
> should be two groups 
> (control vs treated)  of three bars for the three enzymes.
> 
> Thanks
> 
> Peter
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... {{dropped}}

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to