There is a package "lpSolve" that you might want to look at. At the R
prompt, do the following:
> install.packages("lpSolve")

Once the package will be installed, you can type help(lpSolve) to get
details.

cheers,
-Girish

On Nov 13, 8:37 am, "Yun, Myung Ho" <[EMAIL PROTECTED]>
wrote:
> Dear All,
>
> First of all, this is the first time for me to use R for optimization, I
> tried to search r-help postings & googled on weighted sum optimization,
> I could not find anything applicable.
>
> I would need to optimize following function in R;
>
> MAXIMIZE
> function = w1*R1 + w2*R2 + w3*R3 + w4*R4
>
> Where constraints are,
> w1 + w2 + w3 + w4 = 1 and  0 <= w1, w2, w3, w4 <= 1
>
> Does optim in R can do this optimization? If so, could anyone show me
> how to use 'optim()' in R?
>
> Thank you in advance and regards,
> Myung
>

______________________________________________
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.

Reply via email to