icount: A count iterator.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Constructs a count iterator with start, (maximum) count and stepsize.

Usage

1
icount(start = 0L, count = NULL, step = 1L)

Arguments

start

An integer. Start of the count iterator (default = 0L)

count

An integer. Stop of the count iterator (default = NULL). Never ceases counting by default.

step

An integer. Step size of the count iterator (default = 1L).

Details

The use of negative integers is also possible. If step is negative, this will generate a decreasing sequence. If step is zero, it will generate a constant, neverending sequence, independent of count.

Value

A count iterator.

Author(s)

Domink Mueller (dominikmueller64@yahoo.de)

See Also

icount and icount.

Examples

1
2
3
4
5
ct <- icount(start = 3L, count = 10L, step = 3L)
iterators::nextElem(ct)
iterators::nextElem(ct)
iterators::nextElem(ct)
iterators::nextElem(ct)

DominikMueller64/dmisc documentation built on May 6, 2019, 2:52 p.m.