I need to run two R scripts in sequence. I am not asking about running scripts in parallel.
Each script has a stop-if-error logic inside. So if I run either of them separately, the execution will halt when an error occurs. The problem is, when I put them in a wrapper code like this:
source('script1.r', echo=T)
source('script2.r', echo=T)
and when an error occurs in script1.r, R will move on to execute script2.r.
How do I tell R to stop completely and not to move on in such a scenario?