[S] uniroot -- doesn't work recursively

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
26 Apr 1999 15:27:29 +0200


Martin Maechler <maechler@stat.math.ethz.ch> writes:

>     PD> zeroin was not the only problem, there's also trouble with global
>     PD> storage used by the wrapper routine. And since C doesn't have
>     PD> lexical scoping, that stuff needs to be passed around via
>     PD> arguments. Oh well...
> 
> yes (I think that's what the comment in optimize.c [the wrapper] meant
>      that I had cited here...).
> and  YES  it would be really nice if that could be done, finally.

It is done now. (Actually took about as much time as writing the email
griping about it...)

>      uniroot(f.dev, interval=interv, y=y, crit=crit)     
$root
[1] 0.05408745

$f.root
[1] 0.0009728222

$iter
[1] 5

$estim.prec
[1] 6.103516e-05

I'll commit my stuff in a moment.

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