Skip to content
Prev 247403 / 398503 Next

How to *completely* stop a script after stop()?

Hi Carl,
If you wrap the whole script in brackets the script will not proceed
past the stop() function:

{
for(i in 1:10){

       print(i)
       if(i == 5) stop("i == 5")


}
for(i in 11:100) print(i)
}

best,
Ista
On Sat, Jan 15, 2011 at 4:29 PM, Carl Witthoft <carl at witthoft.com> wrote: