Re: [R] How to terminate R program if found any execution error

2011-09-27 Thread Allan Engelhardt
The original poster may also be interested in options("error") to capture the 'any execution error' requirement. From the examples in help("options"): ## Not run: ## on error, terminate the R session with error status 66 options(error = quote(q("no", status=66, runLast=FALSE))) stop("test it")

Re: [R] How to terminate R program if found any execution error

2011-09-26 Thread Duncan Murdoch
On 11-09-27 12:20 AM, arunkumar wrote: Hi I want to terminate R process if there are any execution error. a="a" b=10 c=try(a/b) if(class(c)[1]=="try-error") { stop("Wrong Input Value") } d=c*c if c fails then it should terminate the process. Please can anyone help Keep the

[R] How to terminate R program if found any execution error

2011-09-26 Thread arunkumar1111
Hi I want to terminate R process if there are any execution error. a="a" b=10 c=try(a/b) if(class(c)[1]=="try-error") { stop("Wrong Input Value") } d=c*c if c fails then it should terminate the process. Please can anyone help -- View this message in context: http://r.789695.n4.n