RE: [R] don't stop when error occurs

2004-03-18 Thread Andy Bunn
You can do that easily with 'try'
?try
 'try' is a wrapper to run an expression that might fail and allow
 the user's code to handle error-recovery.
HTH, Andy

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] don't stop when error occurs

2004-03-18 Thread Liaw, Andy
Read ?try, ?tryCatch, as well as the posting guide mentioned in the footer.

Andy

 From: pastaska1934
 
 hi,
 i'm doing some bootstraping on a data set, using kmeans for 
 each bootstrap,
 i mean i do a loop(200 times) and in each loop i use kmeans.
 i have to count some occurences in a matrix result,
 but somentimes kmeans fail, cause of the algorithm.
 so i would like to avoid my function to stop on kmeans error
 is there a way to do such a thing?
 like
 if(kmeans()=error)continue
 or
 if(kmeans != -1) go on
 
 thanks
 
 sebeuu^^
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


--
Notice:  This e-mail message, together with any attachments,...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] don't stop when error occurs

2004-03-18 Thread Wayne Jones
Look up ?try

Regards

Wayne

-Original Message-
From: pastaska1934 [mailto:[EMAIL PROTECTED]
Sent: 18 March 2004 14:36
To: [EMAIL PROTECTED]
Subject: [R] don't stop when error occurs


hi,
i'm doing some bootstraping on a data set, using kmeans for each bootstrap,
i mean i do a loop(200 times) and in each loop i use kmeans.
i have to count some occurences in a matrix result,
but somentimes kmeans fail, cause of the algorithm.
so i would like to avoid my function to stop on kmeans error
is there a way to do such a thing?
like
if(kmeans()=error)continue
or
if(kmeans != -1) go on

thanks

sebeuu^^

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html


KSS Ltd
Seventh Floor  St James's Buildings  79 Oxford Street  Manchester  M1 6SS  England
Company Registration Number 2800886
Tel: +44 (0) 161 228 0040   Fax: +44 (0) 161 236 6305
mailto:[EMAIL PROTECTED]http://www.kssg.com


The information in this Internet email is confidential and m...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html