Re: [R] terminating function

2010-04-09 Thread Alain Guillet
Hi, Look at the function stop which does what you want. ?stop Alain On 09-Apr-10 11:27, Covelli Paolo wrote: Hi everyone, I 'm building a function, in the middle it controls the sign of a variable x. If x < 0 the function write a warning (Error: negative value!). At this point I want the fu

[R] terminating function

2010-04-09 Thread Covelli Paolo
Hi everyone, I 'm building a function, in the middle it controls the sign of a variable x. If x < 0 the function write a warning (Error: negative value!). At this point I want the function stops without execute the remaining code. How can I do to terminate the function before your ending?