[R] Scoping problem
halvorsen
kjetilh at umsanet.edu.bo
Wed Jul 5 23:41:23 CEST 2000
Hola!
I have the following simple function:
> testcar
function(pow){
ob <- glm(Pound~CG+Age+Vage,data=car,weights=No,
subset=No>0,family=quasi(link=power(pow),var=mu^2))
deviance(ob)
}
But trying to run it gives:
> testcar(1/2)
Error in power(pow) : Object "pow" not found
I have tried to use debug on testcar, but what I can find out is only
that pow
is invisible from within glm. Is there a way to find in which
environment
pow belongs, so as to get at it with "get" inside power?
Kjetil Halvorsen
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list