[R] how to show iterations

sffarooqi sffarooqi at gmail.com
Sun Oct 14 19:43:33 CEST 2012


Hi Pieter, thank you for your response.
I am indeed using the "optim" function. I had already tried the trace option
under the control argument - however it only provides me with iteration no.
10, 20, 30 etc. I would like to be able to generate the results for every
iteration. 

Here is an example (where fr is the function and grr the gradient - which
were previously defined already)
<- optim(c(-1,1), fr, grr, method = "BFGS", control=list(trace = TRUE)))

Also I shd mention I had tried the print command previously too but this
hadn't worked. You mentioned that I could use fix() to add a print statement
- would you be able to suggest how to implement it pls? Once again, thank
you for your help -I am really appreciative!



--
View this message in context: http://r.789695.n4.nabble.com/how-to-show-iterations-tp4646133p4646158.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list