[R] kmeans error (bug?)

Jason Turner jasont at indigoindustrial.co.nz
Mon Nov 10 21:01:35 CET 2003


Murad Nayal wrote:
> I am running kmeans in a loop for a range of possible cluster numbers.
> The error terminates the loop. is there a mechanism by which I can
> 'trap' the error so that I can rerun kmeans with another set of initial
> centers and hence allow the loop to run to completion. something like
> try {} catch() mechanism of C++ for example.

For R version < 1.8.0, ?try
For R version >= 1.8.0, see also ?tryCatch

Jason
-- 
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz




More information about the R-help mailing list