Skip to content
Back to formatted view

Raw Message

Message-ID: <20050321110536.90386.qmail@web86901.mail.ukl.yahoo.com>
Date: 2005-03-21T11:05:36Z
From: Guillaume STORCHI
Subject: menu() and continue a repeat loop without executing the code that follows the loop!!?

> first:I'd like to have the choice between breaking out a repeat loop or
> continue it

>

> then: i'd would like my code after the end of my repeat loop not to be read
> unless I type 2 (to continue executing the content of my repeat loop) THAT'S
> THE PROBLEM
> Is there any way to go straight out of the loop (like a "goto" associated to
a
> "label") or a pause like command to prevent R from reading the entire
script??

I actually have this kind of code

reapeat{
...
...
...
switch(menu(c("continue to select points","modelling")),next,break)
}
...
...


With the right brackets, it doesn't work either!
R read the entire code that follows the switch(...) when I choose "continue to
select points" instead of ONLY reading the repeat loop.

Guillaume Storchi