[R] Regression Column names instead of numbers

2013-08-02 Thread TMiller
Hi guys I am new to R and I am currently trying to do a regression: I have two matrices with 200 time series each. In order to achieve a loop, I used the following command: sapply(1:200, function(x) summary(lm(formula=matrix1[,x]~matrix2[,x]))) Each column/time series has a unique name, in case

Re: [R] Regression Column names instead of numbers

2013-08-02 Thread David Carlson
-project.org] On Behalf Of TMiller Sent: Friday, August 2, 2013 10:17 AM To: r-help@r-project.org Subject: [R] Regression Column names instead of numbers Hi guys I am new to R and I am currently trying to do a regression: I have two matrices with 200 time series each. In order to achieve a loop, I used

Re: [R] Regression Column names instead of numbers

2013-08-02 Thread TMiller
Hello David Thanks for your answer. It works with the number in the double bracket above each of the regression results. However, the x's still remain in the call formula. I really appreciate any help Best Tom -- View this message in context:

Re: [R] Regression Column names instead of numbers

2013-08-02 Thread arun
: Sent: Friday, August 2, 2013 11:16 AM Subject: [R] Regression Column names instead of numbers Hi guys I am new to R and I am currently trying to do a regression: I have two matrices with 200 time series each. In order to achieve a loop, I used the following command: sapply(1:200, function(x) summary