Constructs iterators that generate regular sequences that follow the
seq family.
iseq(
from = 1,
to = NULL,
by = NULL,
length_out = NULL,
along_with = NULL,
...,
recycle = FALSE,
chunkSize,
chunks
)iseq_along(along_with, ...)
an iteror.
the starting value of the sequence.
the end value of the sequence.
increment of the sequence.
desired length of the sequence. A non-negative number,
which for seq will be rounded up if fractional.
the length of the sequence will match the length of this
Unused.
Whether to restart the sequence after it reaches to.
Optional; return this many values per call.
Optional; return this many chunks.
The iseq function generates a sequence of values beginning with
from and ending with to. The sequence of values between are
determined by the by, length_out, and along_with
arguments. The by argument determines the step size of the sequence,
whereas length_out and along_with determine the length of the
sequence. If by is not given, then it is determined by either
length_out or along_with. By default, neither are given, in
which case by is set to 1 or -1, depending on whether to >
from.
icount icountn
it <- iseq(from=2, to=5)
unlist(as.list(it)) == 2:5
Run the code above in your browser using DataLab