dataframes in glm (PR#392)

About this list Date view Thread view Subject view Author view Other groups

Subject: dataframes in glm (PR#392)
jlindsey@alpha.luc.ac.be
Date: Wed 29 Dec 1999 - 23:22:19 EST


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


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:12 EST