From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Thu 21 Jun 2001 - 03:10:59 EST
Message-ID: <x2lmmnnkkc.fsf@blueberry.kubism.ku.dk>
Duncan Murdoch <murdoch@stats.uwo.ca> writes:
> I don't know why one version works and the other doesn't, but I've
> noticed problems in the past when using "data" as a variable name, and
> in fact even the first version fails for me when I type it exactly as
> you did.
>
> I suspect the strange behaviour you saw is related to the fact that
> data is a matrix rather than a data.frame, and indeed everything is
> fine if I change your code to
I got it now: The problem is that eval accept an integer as its envir
argument (as in sys.call()) so lm and friends do too. If you pass a
numeric object, like a matrix, the first element is extracted and
coerced to integer. That'll explain why the behaviour changes when a
column is multiplied by 149...
The reason the example ever worked was that x,y,z from the global env.
got picked up.
-- 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-help 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-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:45 EST