enter
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of C.H.
> Sent: Monday, September 12, 2011 1:54 AM
> To: R-help
> Subject: [R] Multiple t.test
>
>
Thank you for your help
Yes i wanted to do the t test for all columns except for the grouping
column.
2011/9/12 Uwe Ligges
>
>
> On 12.09.2011 13:16, Raphael Saldanha wrote:
>
>> Hi!
>>
>> Try something like this:
>>
>> subset(example, disease==TRUE)
>> subset(example, disease==FALSE)
On 12.09.2011 13:16, Raphael Saldanha wrote:
Hi!
Try something like this:
subset(example, disease==TRUE)
subset(example, disease==FALSE)
Hmmm, I think the actual answer to the question is something along this
line:
sapply(example[names(example)!="disease"],
function(x) t.test(x ~
Hi!
Try something like this:
subset(example, disease==TRUE)
subset(example, disease==FALSE)
On Mon, Sep 12, 2011 at 4:54 AM, C.H. wrote:
> Dear R experts,
>
> Suppose I have an data frame likes this:
>
> > example <- data.frame(age=c(1,2,3, 4,5,6),
> height=c(100,110,120,130,140,150), disease
Dear R experts,
Suppose I have an data frame likes this:
> example <- data.frame(age=c(1,2,3, 4,5,6), height=c(100,110,120,130,140,150),
> disease=c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE))
> example
age height disease
1 1100TRUE
2 2110TRUE
3 3120TRUE
4 4130
5 matches
Mail list logo