[R] solving equations
Roger Peng
rpeng at stat.ucla.edu
Fri Aug 30 23:40:28 CEST 2002
You could try using 'uniroot':
> f <- function(F) { F - (25*(F+0.2)/22.2/(exp(F+0.2)-1)) }
> uniroot(f, c(0, 1))$root
[1] 0.6959678
-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Fri, 30 Aug 2002, Antonio Olinto wrote:
> Dear R-users,
>
> I'm trying to solve the following equation:
>
> F=25*(F+0.2)/22.2/(EXP(F+0.2)-1)
>
> In Excel I found F=0.696176718 but I'd like to know how to use R to solve
> it. I tried, without success, to use "solve".
>
> Thanks a lot,
>
> Antonio Olinto
>
>
>
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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