Hi there,
I am using the rbga.bin function from the "genalg"-package. There I am
searching for a way to print the number of the iteration within the monitor
function.
My monitor function looks like this:
monitor <- function(obj) {
minEval = min(obj$evaluations);
print(length(obj$population[obj$evaluations == minEval]))
print(paste("Best eval: ", minEval))
# plot( obj, type="hist" )
plot( obj$evaluations )
}
I tried to print the variable "iter" which I found in the function
code of rbga.bin, but unfortunately it didn't work. How can I get to
iteration number (for example to print in the title of my plot)?
Thanks for our help.
Markus