[R] stop() vs. error() ?
Pierre Kleiber
pkleiber at honlab.nmfs.hawaii.edu
Fri Mar 26 20:58:38 CET 2004
The thing is that functions don't really stop... they return. So what you
want is return()
Cheers, Pierre
ivo welch wrote:
>
> hi andy: yes, I know what it does. My suggestion would be to have a
> different command, that is a "pure stop" without error condition (with
> its message). A stop and an error are really two different things.
>
> regards, /ivo
>
>
> Liaw, Andy wrote:
>
>> Please do read the documentation of the functions you are trying to use.
>> The description in ?stop says:
>>
>> 'stop' stops execution of the current expression and executes an
>> error action.
>>
>> stop() is how error is flagged in R (and S in general). If that's not
>> what
>> you want, try something else. And the `something else' depends on
>> what you
>> want, which has not been described in detail.
>>
>> Andy
>>
>
> <snip>
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
--
-----------------------------------------------------------------
Pierre Kleiber, Ph.D Email: pkleiber at honlab.nmfs.hawaii.edu
Fishery Biologist Tel: 808 983-5399/737-7544
NOAA FISHERIES - Honolulu Laboratory Fax: 808 983-2902
2570 Dole St., Honolulu, HI 96822-2396
-----------------------------------------------------------------
"God could have told Moses about galaxies and mitochondria and
all. But behold... It was good enough for government work."
More information about the R-help
mailing list