Message-ID: <CAAmySGOWrG4_gxkuoB8vT2DKymU_VNW5n232jza16qO0Pqu1Vw@mail.gmail.com>
Date: 2012-02-25T22:15:17Z
From: R. Michael Weylandt
Subject: Help needed please
In-Reply-To: <BLU0-SMTP163B3F0C4293012A49CE0BDF46B0@phx.gbl>
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.