Re: [R] Extracting original variable list from lm object

2008-02-19 Thread Sung, Iyue
perfect. many thanks. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 19, 2008 1:26 PM To: Sung, Iyue Cc: r-help@r-project.org Subject: Re: [R] Extracting original variable list from lm object Try: all.vars(formula(my.model)) On Feb 19

Re: [R] Extracting original variable list from lm object

2008-02-19 Thread Gabor Grothendieck
Try: all.vars(formula(my.model)) On Feb 19, 2008 1:10 PM, Sung, Iyue <[EMAIL PROTECTED]> wrote: > Fellow R users, > > I have an lm object, from which I would like to extract the list of > original variables. > The problem I have is the formula includes functions of the covariates. > > I tried us

[R] Extracting original variable list from lm object

2008-02-19 Thread Sung, Iyue
Fellow R users, I have an lm object, from which I would like to extract the list of original variables. The problem I have is the formula includes functions of the covariates. I tried using "attr", but the result stores the transformed variable name. For example: > my.model<-lm(y ~ a + log(b +