I would like to use the 'tryCatch' function but am having a hard time getting 
my head around it. In 'C' like languages try/catch/finally means try a block of 
statements and if any throw an error then do the statements in the catch block 
and then error or not always do the staements in the finally block. In 'R' as 
best as I can tell the block of staements in the try block is a single 
function. Does this mean I need to construct a temporary function that contains 
what I would have put in the try blck? Also in 'R' it seems the 'finally' 
function (of 'tryCatch' most closely mimics the catch block of 'C'. Right? A 
similar comment on the finally function. Do I need to create a temporary 
function that contains the staements that I normally would put in a 'C' like 
catch clause? If I do need to create functions for the try and error conditions 
what is the scope or enviironment that the functions are called under? The 
'try' function is relatively straightforward but when an error occu!
 rs what variable will I have access to?

Thank you.

Kevin

______________________________________________
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