From jlindsey@alpha.luc.ac.be  Wed Dec 29 13:22:19 1999
From: jlindsey@alpha.luc.ac.be (jlindsey@alpha.luc.ac.be)
Date: Wed, 29 Dec 1999 14:22:19 +0100 (MET)
Subject: dataframes in glm (PR#392)
Message-ID: <199912291322.OAA04095@pubhealth.ku.dk>

According to the glm documentation, an optional dataframe can be
supplied in data=. It would be nice if any object that can be coerced
to a dataframe (as.data.frame) were accepted. I am thinking of my data
objects. As it stands, I have to use data=as.data.frame(object) in
glm.
  As far as I can see, the only change required is to add a line in
models.R. After l.216:

if(missing(data))
	data <- sys.frame(sys.parent())

add

else if(!is.data.frame(data)&&!is.environment(data))
	data <- as.data.frame(data)

I don't think this should have adverse effects elsewhere and would
make life easier for the users of my libraries.
  Thanks. Jim

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


dataframes in glm (PR#392)
jlindsey@alpha.luc.ac.be