[Rd] expand.model.frame fails when call creating model has no data (PR#1423)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
29 Mar 2002 17:13:46 +0100


jfox@mcmaster.ca writes:

> I'm able to get expand.model.frame to do what I think it's supposed to do 
> by replacing the line
> 
> 	rval <- eval(call("model.frame", ff, data = data, subset = subset,
>              	na.action = I), envir)
> 
> with
> 
>          rval <- if (is.null(data)) eval(call("model.frame", ff, subset = 
> subset, na.action = naa), envir)
>             	else eval(call("model.frame", ff, data = data, subset = 
> subset, na.action = naa), envir)

Yes, but a better fix seems to be to have model.frame check for an
explicit NULL data argument. Looks like a few cases of missing(data)
in there might as well have read is.null(data) since that is the
default. Anyone know better?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._