[R] extracting more information from optim in R?
Bart Joosen
bartjoosen at hotmail.com
Wed Jan 12 15:37:05 CET 2011
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.
More information about the R-help
mailing list