Re: [R] finding value for a parameter in an equation, much appreciate the help. I will double check sources.

2014-04-23 Thread Andras Farkas
Frede Thank you for the explanation, now I better understand how to write functions like this, Andras [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
eatly appreciate the help Thanks Andras Sent from Yahoo! Mail on Android From: Frede Aakmann Tøgersen ; To: Frede Aakmann Tøgersen ; Andras Farkas ; r-help@r-project.org ; Subject: RE: [R] finding value for a parameter in an equation Sent: Wed, Apr 23, 2014 9:04:09 AM

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Andras Farkas
Frede Thank you very much for the help. Indeed, I am trying to do exactly what you wrote the code for. I may have caused some confusion though as a result of a typographic error in my equation: the result of the equation should EQUAL to the value of 1. I see you have inputted the equation into

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
the sender. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Frede Aakmann Tøgersen > Sent: 23. april 2014 10:54 > To: Andras Farkas; r-help@r-project.org > Subject: Re: [R] finding value for a parameter in an e

Re: [R] finding value for a parameter in an equation

2014-04-23 Thread Frede Aakmann Tøgersen
Hi Andras I suppose you want to find the real root of your equation if such exists for the particular settings of the parameters. For that you can use uniroot(). So define a function based on your equation like this: f <- function(E, D1, D2, IC501, IC502, ECON, ALPHA, M1, M2){ 1 - D1/(IC501