An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110112/1133d3d1/attachment.pl>
extracting more information from optim in R?
2 messages · Steve Su, Bart Joosen
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.