[R] Is it possible to coerce R to continue proceeding the next command in a loop after an error message ?

2005-07-16 Thread Yimeng Lu
Hello R-users, In a loop, if a function, such as nls, gives an error, is it possible to coerce R to continue proceeding the next command with the same loop? Thanks so much for your advice! Hanna Lu [[alternative HTML version deleted]] __

Re: [R] Is it possible to coerce R to continue proceeding the next command in a loop after an error message ?

2005-07-16 Thread Duncan Murdoch
Yimeng Lu wrote: Hello R-users, In a loop, if a function, such as nls, gives an error, is it possible to coerce R to continue proceeding the next command with the same loop? Yes, see the try() function. The basic usage is something like value - try( some calculation ) if

Re: [R] Is it possible to coerce R to continue proceeding the next command in a loop after an error message ?

2005-07-16 Thread Spencer Graves
?try spencer graves Yimeng Lu wrote: Hello R-users, In a loop, if a function, such as nls, gives an error, is it possible to coerce R to continue proceeding the next command with the same loop? Thanks so much for your advice! Hanna Lu [[alternative HTML