Re: R-alpha: R16 problems

Thomas Lumley (
Tue, 11 Feb 1997 09:51:16 -0800 (PST)

Date: Tue, 11 Feb 1997 09:51:16 -0800 (PST)
From: Thomas Lumley <>
To: r-testers <>
Subject: Re: R-alpha: R16 problems
In-Reply-To: <Pine.SUN.3.91.970211090354.5897B-100000@chekov>

On Tue, 11 Feb 1997, Thomas Lumley wrote:
> I have reported this one before.  model.matrix() does not check the names 
> in the data frame you hand it.  It only works if the data argument (is 
> identical to) the result of model.frame(formula,data).  One temporary 
> solution is to replace model.matrix(formula,data) by 
> model.matrix(formula,model.frame(formula,data))

To be fair, I should point out that Chambers & Hastie (p43) do say that a 
model matrix should be constructed from a model frame. (it's just that 
S-PLUS will let you use other data frames).

Thomas Lumley
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :

r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: