nlmin(f, x, d=rep(1,length(x)), print.level=0, max.fcal=30, max.iter=15, init.step=1, rfc.tol=<<see below>>, ckfc=0.1, xc.tol=<<see below>>, xf.tol=<<see below>>)
Dennis, J. E. and Mei, H. H. W. (1979). Two new unconstrained optimization algorithms which use function and gradient values. Journal of Optimization Theory and Applications 28, 453-483.
# minimize a simple function func <- function(x) {x^2-2*x+4} min.func <- nlmin(func,0)# one way to pass parameters to the function is: function() { co <- c(1, 2) assign("co", co, frame = 1) f1 <- function(x) { co[1] + co[2] * x^2 } nlmin(f1, 10) }