From smyth at wehi.EDU.AU  Sun Mar 26 15:06:42 2006
From: smyth at wehi.EDU.AU (Gordon K Smyth)
Date: Sun, 26 Mar 2006 23:06:42 +1000 (EST)
Subject: [Rd]  How to capture t-score and p-values from t.test
In-Reply-To: <mailman.9.1143367202.16219.r-devel@r-project.org>
References: <mailman.9.1143367202.16219.r-devel@r-project.org>
Message-ID: <1399.58.106.251.152.1143378402.squirrel@homebase.wehi.edu.au>

> Date: Sat, 25 Mar 2006 16:57:50 -0400
> From: Kjetil Brinchmann Halvorsen
> 	<kjetilbrinchmannhalvorsen at gmail.com>
> Subject: Re: [Rd] How to capture t-score and p-values from t.test
> To: "Bernzweig, Bruce \(Exchange\)" <bbernzwe at bear.com>
> Cc: r-devel at r-project.org
>
> Bernzweig, Bruce (Exchange) wrote:
>> When I do t.test on two distributions (see example below), it outputs
>> numerous data about the t.test.
>>
>> What I'd like to do is individually capture some of this data and assign
>> it to other variables.
>>
>> However, I am unable to find anything in the help section.
>
> t.test returns an object of class "htest", but ?htest :
>  > ?htest
> No documentation for 'htest' in specified packages and libraries:
> you could try 'help.search("htest")'
> but that does not do anythinh eiather.
>
> Some time ago, I wrote a helpfile for htest, but that was rejected,
> since "S3 classes are not usually documented".
>
> Kjetil

The "htest" object created by t.test() is fully documented in the "Value" section of
help("t.test").  In effect, this defines what a "htest" object is understood to be.

help.search("htest") brings up a list of every function which produces an "htest" object.

Gordon



[Rd] How to capture t-score and p-values from t.test
Gordon K Smyth