[R] Difficulties with for() {while(){}}

Ronaldo Reis-Jr. chrysopa at gmail.com
Wed Nov 16 16:47:11 CET 2005


Em Qua 16 Nov 2005 11:30, jim holtman escreveu:
> What do you mean by 'abort'? Does an 'error' occur that you want to catch?
> If so, look at 'try'. Otherwise if it is testable, then just test for the
> condition and restart.
>

Hi,

this is not a real error, is a situation whitout a resolution.

Is, I try to test the condition and restart, but how to restart all?

Matthias suggest the use of initialize, I dont undertande how to use this.

I try this:

myfunction <- function(...) {

  ## Init of function
  ...

  for(i in test) {
    ...

    while(j <= test2) {
    ...
      test3 <- make a test 
      if(test3 == error) {
      myfunction(...)
      }
    }
  }
}

This is the best way to make this?

In this case I need to put all arguments initialized in function(...) on the 
myfunction(...) .

Thanks
Ronaldo

-- 
Faça algo à prova de idiotas e alguém fará um idiota melhor.
--
|>   // | \\   [***********************************]
|   ( õ   õ )  [Ronaldo Reis Júnior                ]
|>      V      [UFV/DBA-Entomologia                ]
|    /     \   [36570-000 Viçosa - MG              ]
|>  /(.''`.)\  [Fone: 31-3899-4007                 ]
|  /(: :'  :)\ [chrysopa at insecta.ufv.br            ]
|>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
|    ( `-  )   [***********************************]
|>>  _/   \_Powered by GNU/Debian Woody/Sarge




More information about the R-help mailing list