[Rd] y ~ X -1 , X a matrix

From: Ross Boylan <ross_at_biostat.ucsf.edu>
Date: Wed, 17 Mar 2010 16:32:41 -0700


While browsing some code I discovered a call to lm that used a formula y ~ X - 1, where X was a matrix.

Looking through the documentation of formula, lm, model.matrix and maybe some others I couldn't find this useage (R 2.10.1). Is it anything I can count on in future versions? Is there documentation I've overlooked?

For the curious: model.frame on the above equation returns a data.frame with 2 columns. The second "column" is the whole X matrix. model.matrix on that object returns the expected matrix, with the transition from the odd model.frame to the regular matrix happening in an .Internal call.

Thanks.
Ross

P.S. I would appreciate cc's, since mail problems are preventing me from seeing list mail.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 17 Mar 2010 - 23:36:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 18 Mar 2010 - 07:21:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive