At 03:15 AM 4/25/2007, francogrex wrote: >This below is not solvable with uniroot to find "a": >fn=function(a){ >b=(0.7/a)-a >(1/(a+b+1))-0.0025 >} >uniroot(fn,c(-500,500)) gives >"Error in uniroot(fn, c(-500, 500)) : f() values at end points not of >opposite sign" > >I read R-help posts and someone wrote a function: >http://finzi.psych.upenn.edu/R/Rhelp02a/archive/92407.html >but it is not very precise. Is there any '"standard" function in R that can >solve this? thanks.
Actually, if you're solving fn(a)==0, then some trivial algebra leads to a linear equation with a=0.001754. Why are you trying to solve this numerically? Is it a single instance of a larger, more general problem? ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: [EMAIL PROTECTED] Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causas scire" ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.