R - Repeat

> Procedural Languages > R

2 - Syntax

repeat {
    # Statement
    if(condition) break
}

3 - Example

i=0
repeat {
    print("Hello World")
    i=1+i
    if(i>=3) break
}
[1] "Hello World"
[1] "Hello World"
[1] "Hello World"
Advertising
lang/r/repeat.txt · Last modified: 2017/02/12 21:02 by gerardnico