[R] Memory leak in R v1.5.1?

Adaikalavan Ramasamy ramasamy at stats.ox.ac.uk
Tue Aug 6 18:25:53 CEST 2002

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 at stat.math.ethz.ch

More information about the R-help mailing list