[R] How to extract p-value into a table from a groups of t test

Bert Gunter gunter.berton at gene.com
Wed Apr 15 22:53:38 CEST 2009


 
Everything in R is  an object! ?str

z <- t.test(x,y,...)

str(z)


Bert Gunter
Genentech Nonclinical Biostatistics
650-467-7374

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Jun Shen
Sent: Wednesday, April 15, 2009 1:30 PM
To: r-help at r-project.org
Subject: [R] How to extract p-value into a table from a groups of t test

Hi,

I have run a groups of t test and obtained a list of the t-test results
(about 30). How do I extract p-values from the 30 t-test results and make a
table output? Thanks

Jun

Example t-test output:
============================
$Lambda_z

        Welch Two Sample t-test

data:  x[PA1.BS.DN$Onecode == 2] and x[PA1.BS.DN$Onecode == 3]
t = -0.1128, df = 33.635, p-value = 0.9109
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -0.001918987  0.001717230
sample estimates:
  mean of x   mean of y
0.004893264 0.004994143
......


-- 
Jun Shen PhD
PK/PD Scientist
BioPharma Services
Millipore Corporation
15 Research Park Dr.
St Charles, MO 63304
Direct: 636-720-1589

	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list