cycleSequence: Cycling sequence of integers

Description Usage Arguments Value Examples

View source: R/lazySequence.R

Description

Cycling sequence of integers

Usage

1

Arguments

start

Start of the cycle, inclusive.

end

End of the cycle, not included.

step

The step size, defaults to 1L.

Value

Cycle sequence object of integers cycling from start to end by step size.

Examples

1
2
3
4
seq <- cycleSequence(1, 4, 2)
for (i in 1:4) {
  print(nextItem(seq))
}

bobjansen/recollections documentation built on Feb. 13, 2022, 1:30 p.m.