[R] Looping and break

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Mar 3 04:08:12 CET 2015


Sigh. To be positive is to be wrong at the top of one's lungs. Next I will be told R has a goto statement.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On March 2, 2015 6:23:57 PM PST, Rolf Turner <r.turner at auckland.ac.nz> wrote:
>On 03/03/15 15:04, Jeff Newmiller wrote:
>> Your example is decidedly not expressed in R, though it looks like
>> you tried. Can you provide the hand-computed result that you are
>> trying to obtain?
>>
>> Note that the reason you cannot find anything about next or break in
>> R is that they don't exist.
>
>Point of order, Mr. Chairman, but they ***do*** exist.  See e.g ?"next"
>
>(which actually takes you to the help for "Control Flow").
>
>> There are generally alternative ways to
>> accomplish the kinds of things you might want to accomplish without
>> them, and those alternatives often don't involve explicit loops at
>> all.
>
>Otherwise I concur with everything you say.
>
>cheers,
>
>Rolf



More information about the R-help mailing list