Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 5:25 PM, Ulrike Grömping wrote: David Winsemius wrote: On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does retu

Re: [R] poly objects as data frame columns

2009-07-17 Thread Ulrike Grömping
David Winsemius wrote: > > > On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: > >> >> David, >> >> thanks. Your explanation does not quite fit, though, as it refers to >> using >> function data.frame, while I assigned the new column with $<-. >> poly() does >> return an object of classe

Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
On Jul 17, 2009, at 3:24 PM, Ulrike Grömping wrote: David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does return an object of classes poly and matrix, not model.matrix, But model.matr

Re: [R] poly objects as data frame columns

2009-07-17 Thread Ulrike Grömping
David, thanks. Your explanation does not quite fit, though, as it refers to using function data.frame, while I assigned the new column with $<-. poly() does return an object of classes poly and matrix, not model.matrix, and handing a poly object to function data.frame does behave like I would ex

Re: [R] poly objects as data frame columns

2009-07-17 Thread David Winsemius
Dataframes are lists. Look at dat with str and you will see that the third column (actually the third list element) is a matrix. It's not hard to find the documentation. If you read the documentation on the help page for data.frame you should see this: "If a list or data frame or matrix is