[R] Repating a loop of lm function with different columns of database

2011-07-14 Thread Jon Toledo
Hi, First let me thank you for the incredible help and resource that this forum is. I am trying to compare the repeated measurement of more than 100 analytes that have been take in 70 subjects at 2 time points adjusted for the time difference of sample times(TimeDifferenceDays), therefore I

Re: [R] Repating a loop of lm function with different columns of database

2011-07-14 Thread Weidong Gu
If I understood your question x-data.frame(matrix(rnorm(2000,10,10),ncol=50)) sapply(1:5,function(i) summary(lm(x[,i]~x[,i+10]+x[,50]))) Weidong Gu On Thu, Jul 14, 2011 at 2:27 PM, Jon Toledo tintin...@hotmail.com wrote: Hi, First let me thank you for the incredible help and resource that