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 ______________________________________________ R-help@r-project.org 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.