How about: as.numeric(t.test(rnorm(12))[[1]]) ----- Original Message ----- From: "Chuck Cleland" <[EMAIL PROTECTED]> To: "christopher ciotti" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, April 16, 2004 6:25 PM Subject: Re: [R] t.test & formatting question
> 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 > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html