Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] how to abort script with message

Blew, Ted

2007-05-21


it is desired to abort an R script with a message, returning to the R
prompt,
pending 'if' results, as follows:
------------------------
first part of script
.
.
if (condition) {
action
} else
{
'error'
abort
}
.
.
remainder of script
---------------------------

note: 'stop' aborts the current script expression but keeps running the
script.[too little]
    'quit' aborts the r session. [too much]
thx,
ted




--------------------------------------------------
This e-mail and any files transmitted with it may contain privileged or confidential information.
It is solely for use by the individual for whom it is intended, even if addressed incorrectly.
If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute,
or take any action in reliance on the contents of this information; and delete it from
your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.
--------------------------------------------------

 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.