loop {oosp}R Documentation

Enhanced For Loop Function

Description

The iter function produces an integer vector from min to n, if n >= min, and a zero length vector otherwise. Instead of if (n > 0) for (i in 1:n) ...commands..., we can write for (i in iter (n) ) ...commands... .

Usage

iter (n, min=1)

Arguments

n
min

[Package oosp version 0.1.0 Index]