[R] Using uniroot() with output from deriv() or D()

jjheath heath_jeremy at hotmail.com
Sat Feb 26 22:30:01 CET 2011


Hans,

Both your methods worked great!  They was exactly what I was looking for.
I ended up using the second method as it is a little more efficient:

fn2nd_fun <- function(x) eval(fn2nd, list(x=x))
    ex <- seq(from=0, to=1, length.out = 1000)
    y1 <- fn2nd_fun(ex)
    ...
    r <- uniroot(fn2nd_fun, interval=c(0, 1), tol=0.0001) 

Thanks,
J

-- 
View this message in context: http://r.789695.n4.nabble.com/Using-uniroot-with-output-from-deriv-or-D-tp3325635p3326296.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list