[R] How to stop execution

Fernando Saldanha fsaldan1 at gmail.com
Sun Oct 15 19:19:35 CEST 2006


I frequently run R code using source() or just paste large chunks of
code into the console window. When there is an error in the code the
execution does not stop. Rather, there is a blue error message and the
remainder of the code continues to execute.

Questions:

1) Is there a way to change the color of the error messages from blue
to another color? There are other messages (not error messages) that
are also blue and to have another color would make it easier to spot
errors as the screen scrolls through the code.

2) Is there a way to make execution of the sourced or pasted code to
stop immediatelyt if there is an error? I did some research and found
a way to make the whole session end, but that is too radical. I also
tried to change the option error from NULL to stop and that also does
not do the trick: the remaining pasted or sourced code is still
executed.

Any help will be appreciated. I am running R version 2.3.0 on Windows XP Pro.

FS



More information about the R-help mailing list