[R] Help needed please

R. Michael Weylandt michael.weylandt at gmail.com
Sat Feb 25 23:15:17 CET 2012


Look at ?optim and example(optim)

Michael

On Sat, Feb 25, 2012 at 11:47 AM, Jaymin Shah <jayminshah1 at hotmail.com> wrote:
> I was wondering how to make a function which minimises  a vector (a,b,c,d).
>
> I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to make this equation as small as possible. Thus need to find the values for a b c and d for which this happens.
>
> I know there is a function in r which does minimisation but how could i make the function to input it into this function.
>
> Thanks
>
> Jaymin
> ______________________________________________
> 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.



More information about the R-help mailing list