[R] Get all X iterations in optim output when controls(trace=6)

From: Cleber Nogueira Borges <klebyn_at_yahoo.com.br>
Date: Fri, 30 May 2008 20:44:42 -0300

Hi,
I would like to get all X iterations in optim output in matrix form. I know about the follow approach:

sink("reportOptim")
optim( ......., control=list( trace=6,..........) ) sink()
all_iterOptim <- readLines("reportOptim") unlink("reportOptim")
all_iterOptim <- all_iterOptim[ grep( '^X', all_iterOptim ) ] ### TODO: the rest !!! :-)

But it is very silly code when the output is large... Somebody can help me?

Cleber                 


Experimente jŠ e veja as novidades.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 02 Jun 2008 - 06:53:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 02 Jun 2008 - 22:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive