Re: [R] exit function in R?

From: Hans-Joerg Bibiko <bibiko_at_eva.mpg.de>
Date: Mon, 02 Jun 2008 15:33:17 +0200

On 2 Jun 2008, at 15:18, Federico Abascal wrote:

> Hi,
> This is likely an stupid question, but I cannot find the solution.
> I am searching for an "exit" function, to end the execution of an R
> script if some condition is not filled.
> Any clue?
>

f <- function() {

   ...
   if (1 == 1) return(WHATEVER)
   ...
   ...
   return(ONSUCCESS)
}

--Hans



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 Mon 02 Jun 2008 - 13:47:49 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 Mon 02 Jun 2008 - 14:30:41 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