Skip to content
Prev 307912 / 398502 Next

how to show iterations

If you are writing the loop yourself, you can use print() statements in the loop. If you are using something like optim(), have a look at the documentation and use the trace option under the control argument. Otherwise, put a print statement in the function you are passing to optim. If this fails you can try to edit the default optimization function with fix() to add a print statement where you want it, if the documentation shows that a trace argument is not already built in. 

Otherwise be more specific with your question please, e.g. include example code. To combine text and the values of object in an print statement, use paste().