[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    dataframes in glm (PR#392)
From:       jlindsey () alpha ! luc ! ac ! be
Date:       1999-12-29 13:22:19
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic