Re: [R] Memory leak in R v1.5.1?

About this list Date view Thread view Subject view Author view Attachment view

From: Adaikalavan Ramasamy (ramasamy@stats.ox.ac.uk)
Date: Wed 07 Aug 2002 - 02:25:53 EST


Message-id: <002f01c23d65$ef4c9540$a81401a3@stats.ox.ac.uk>

Hi ! I am trying to minimise a function over 2 variables simultaneously. Is
this possible ? I have only recently been introduced to optim() and
optimise() function. Here is simple example of what I tried to do :

silly.fn <- function(x,y) { (x-5)^2 + (y-2)^2 }
optim( par=c(3,1) , silly.fn )

Analytically, the answer should be (5,2) but the computer is asking for the
y value. Is there a function to do the minimisation simultaneously in S-PLUS
or R ?

Many thanks, Adai.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jun 2004 - 09:31:05 EST