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

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Mon, 02 Jun 2008 16:07:02 +0000 (UTC)

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_at_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. Received on Mon 02 Jun 2008 - 17:57:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jun 2008 - 18:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive