Re: [Rd] Variable names with spaces in lm

2005-05-09 Thread Gabor Grothendieck
There is one other problem with the coercion to data.frame. terms.formula does not actually use the data contents, I think, so if it did not coerce to a data frame it could handle unequal length data in lists too. On 09 May 2005 19:37:25 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Gabor Gro

Re: [Rd] Variable names with spaces in lm

2005-05-09 Thread Peter Dalgaard
Gabor Grothendieck <[EMAIL PROTECTED]> writes: > 'lm' gives an error when using variables with spaces in them > in certain cases (but not all): > > my.list <- list(`a 1` = 1:4, `a 2` = 11:14) > lm(`a 1` ~ ., my.list) # Error : Object "a.1" not found > > # The following work ok so it

[Rd] Variable names with spaces in lm

2005-05-09 Thread Gabor Grothendieck
'lm' gives an error when using variables with spaces in them in certain cases (but not all): my.list <- list(`a 1` = 1:4, `a 2` = 11:14) lm(`a 1` ~ ., my.list) # Error : Object "a.1" not found # The following work ok so it does work in many cases: lm(`a 1` ~ ., as.data.fr