icount: Iterator of neverending numeric sequence with initial value...

Description Usage Arguments Details Value Examples

Description

Constructs an iterator that generates a neverending sequence of evenly spaced values starting with icount. The step size is given by step.

Usage

1
icount(start = 0, step = 1)

Arguments

start

sequence's initial value

step

sequence's step size

Details

NOTE: Use a negative step size to generate decreasing sequences.

Often used as an argument to imap to generate consecutive data points.

Value

sequence's iterator

Examples

1
2
3
4
5
6
7
8
9
it <- icount()
iterators::nextElem(it)
iterators::nextElem(it)
iterators::nextElem(it)

it2 <- icount(start=5.5, step=1.5)
iterators::nextElem(it2)
iterators::nextElem(it2)
iterators::nextElem(it2)

itertools2 documentation built on May 2, 2019, 3:37 p.m.