Sunday, 29 September 2013

R language: Maximize function subject to another function

R language: Maximize function subject to another function

I am interested to know how can I maximize a function f(x) = x/y subject
to x + y = 100 using R. I know a couple of packages like optim or optimize
that helps to do it but it requires a vector of values for the parameters
to be optimized over. I would like to know if I could do it without the
use of the values.
Any advice or help would be appreciated.
Thanks !!

No comments:

Post a Comment