[R] Getting Batch mode to continue running a script after running into errors

From: Josh <jcchang_at_mednet.ucla.edu>
Date: Thu, 12 Jun 2008 15:52:08 -0700

I'm invoking R in batch mode from a bash script as follows:

R --no-restore --no-save --vanilla

When R comes across some error in the script however it seems to halt instead of running subsequent lines in the script:

Error in file(file, "r") : cannot open the connection Calls: read.table -> file
In addition: Warning message:
In file(file, "r") :
  cannot open file '/datapool/experiments/ois/080502/petri': No such file or directory
Execution halted

How can I get R to continue running the script even if it comes across errors? Thanks in advance

R-help_at_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. Received on Fri 13 Jun 2008 - 00:14:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 07:30:46 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive