Re: [R] using for loop for data frame

2014-04-15 Thread Rui Barradas
Hello, Inline. Em 15-04-2014 18:02, Monaly Mistry escreveu: Hi, I have a data frame with 15 different years and each year has a different sample size. I'm having trouble writing a for loop to have a t-test done for each year for two of the columns. Thus far I have been able to loop over the

[R] using for loop for data frame

2014-04-15 Thread Monaly Mistry
Hi, I have a data frame with 15 different years and each year has a different sample size. I'm having trouble writing a for loop to have a t-test done for each year for two of the columns. Thus far I have been able to loop over the years but the output is the same t-test 15 times. I'm new to wr