Generation of abstract index vectors, i.e., objects of class
"abIndex"
.
abIseq()
is designed to work entirely like seq
,
but producing "abIndex"
vectors.
abIseq1()
is its basic building block, where
abIseq1(n,m)
corresponds to n:m
.
c(x, ...)
will return an "abIndex"
vector, when x
is one.
abIseq1(from = 1, to = 1)
abIseq (from = 1, to = 1, by = ((to - from)/(length.out - 1)),
length.out = NULL, along.with = NULL)# S3 method for abIndex
c(...)
An abstract index vector, i.e., object of class
"abIndex"
.
the starting and (maximal) end value of the sequence.
number: increment of the sequence.
desired length of the sequence. A
non-negative number, which for seq
and seq.int
will be
rounded up if fractional.
take the length from the length of this argument.
in general an arbitrary number of R objects; here,
when the first is an "abIndex"
vector, these
arguments will be concatenated to a new "abIndex"
object.
the class abIndex
documentation;
rep2abI()
for another constructor;
rle
(base).
stopifnot(identical(-3:20,
as(abIseq1(-3,20), "vector")))
try( ## (arithmetic) not yet implemented
abIseq(1, 50, by = 3)
)
Run the code above in your browser using DataLab