[R] How can I solve this function in R?

Dieter Menne dieter.menne at menne-biomed.de
Mon Jun 2 18:07:02 CEST 2008


François Aucoin <frank.aucoin <at> gmail.com> writes:

> 
> I would like to solve the following function in R:
> 
> G <- function(k)  (2*(1 - k)*(1 + 2*k)^.5)/(1+3*k)
> 


G <- function(k)  (2*(1 - k)*(1 + 2*k)^.5)/(1+3*k)
GZero <-function(k,G0) G(k)-G0
plot(1:100,G(1:100))
uniroot(GZero,c(0,100),G=-5)


Dieter



More information about the R-help mailing list