Message-ID: <1294843025948-3214066.post@n4.nabble.com>
Date: 2011-01-12T14:37:05Z
From: Bart Joosen
Subject: extracting more information from optim in R?
In-Reply-To: <9CCA6A13A3FF4484924FA862F19067B2@maths.uwa.edu.au>
I have no experience with writing C code, but if I have such problems in R
code, I add a line to my function which prints the values to the console:
eg:
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
cat (paste(x1, x2, "\n"))
100 * (x2 - x1 * x1)^2 + (1 - x1)^2
}
optim(c(-1.2,1), fr)
If the same goes for C, I don't know.
Bart
--
View this message in context: http://r.789695.n4.nabble.com/extracting-more-information-from-optim-in-R-tp3213439p3214066.html
Sent from the R help mailing list archive at Nabble.com.