From ross at biostat.ucsf.edu  Thu Mar 18 00:32:41 2010
From: ross at biostat.ucsf.edu (Ross Boylan)
Date: Wed, 17 Mar 2010 16:32:41 -0700
Subject: [Rd] y ~ X -1 , X a matrix
Message-ID: <1268868761.29395.122.camel@corn.betterworld.us>

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.



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