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

Cleber Nogueira Borges klebyn at yahoo.com.br
Sat May 31 01:44:42 CEST 2008


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.



More information about the R-help mailing list