Re: [R] How to specify a variable name in the regression formula without hard coding it

2011-09-08 Thread Jean-Christophe BOUËTTÉ
have a look at ?formula and the examples 2011/9/8 Bos, Roger : > I have a matrix called mat and y is the column number of my response and > x is a vector of the column numbers of my terms.  The variable name of y > can change, so I don't want to hardcode it.  I can find out the name as > follows:

Re: [R] How to specify a variable name in the regression formula without hard coding it SOLVED

2011-09-08 Thread Bos, Roger
Sent: Thursday, September 08, 2011 9:22 AM To: Bos, Roger Cc: r-help@r-project.org Subject: Re: [R] How to specify a variable name in the regression formula without hard coding it have a look at ?formula and the examples 2011/9/8 Bos, Roger : > I have a matrix called mat and y is the column nu

Re: [R] How to specify a variable name in the regression formula without hard coding it

2011-09-08 Thread David Winsemius
On Sep 8, 2011, at 9:03 AM, Bos, Roger wrote: I have a matrix called mat and y is the column number of my response and x is a vector of the column numbers of my terms. The variable name of y can change, so I don't want to hardcode it. I can find out the name as follows: name

[R] How to specify a variable name in the regression formula without hard coding it

2011-09-08 Thread Bos, Roger
I have a matrix called mat and y is the column number of my response and x is a vector of the column numbers of my terms. The variable name of y can change, so I don't want to hardcode it. I can find out the name as follows: >names(mat)[y] [1] "er12.l" Then I can run the regression