[R] t.test & formatting question

Chuck Cleland ccleland at optonline.net
Sat Apr 17 01:25:20 CEST 2004


   Sorry, I should have checked that more closely.  I see that

t.test(rnorm(12))[[1]]

   retains the "t".

christopher ciotti wrote:
> ...
> I'm trying to format some data where I only need one of the values 
> returned from a test, say a t-test in this instance.  I have the following:
> 
>  > R.version.string
> [1] "R version 1.9.0, 2004-04-12"
>  > x <- rnorm(1001)
>  > t.test(x)$statistic
>        t
> 0.5555321
>  >
> 
> Any easy way (other than straight calculation) to get the t-statistic 
> w/o the 't' above it?  TIA
> ...

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894




More information about the R-help mailing list