On Jan 13, 2012, at 5:53 AM, Rui Esteves wrote:

Dear all,

I need to know in which number of iterations the kmeans converge each
time I run it.
Any idea how to do it?


Look at the help page (to see that it is not part of the returned object) and then look at the code (to see that the object returned from the .C() call is immediately checked to see if the number of iterations exceeded the maximum set by the user. Search for this code:

if (Z$iter > iter.max)

Then you should be able to see your way forward. You can either create a modified return object or you can insert a line that prints that value.

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@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.

Reply via email to