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

From: Paul Smith <>
Date: Mon, 02 Jun 2008 16:58:18 +0100

On Mon, Jun 2, 2008 at 4:31 PM, François Aucoin <> wrote:
> I would like to solve the following function in R:
> G <- function(k) (2*(1 - k)*(1 + 2*k)^.5)/(1+3*k)
> I want to be able to find "k" for a given "G"

Consider G(k)-g. With plot look for intervals where the roots lie in. Afterwards, use uniroot to get the roots.

Paul mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 02 Jun 2008 - 18:19:11 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 Please read the posting guide before posting to the list.

list of date sections of archive