Message-ID: <3BAC86B5.104FA6AE@ci.tuwien.ac.at>
Date: 2001-09-22T12:40:21Z
From: Achim Zeileis
Subject: availability of a "solve" function in R?
Ron Shonkwiler wrote:
>
> I would like to define a function of two variables f(x,y) and, for
> a given value of x, solve f(x,y)=0 for y.
>
> Is this available in R?
Have a look at uniroot(), e.g. do something like
R> myfun <- function(x,y) x+y
R> uniroot(function(x) myfun(x,5), c(-10,10))
cheers
Z
> ron shenk
> shenk at math.gatech.edu
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._