abIseq function

Sequence Generation of "abIndex", Abstract Index Vectors

Sequence Generation of "abIndex", Abstract Index Vectors

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 class 'abIndex' c(...)

Arguments

  • from, to: the starting and (maximal) end value of the sequence.
  • by: number: increment of the sequence.
  • length.out: desired length of the sequence. A non-negative number, which for seq and seq.int will be rounded up if fractional.
  • along.with: take the length from the length of this argument.
  • ...: in general an arbitrary number of objects; here, when the first is an "abIndex" vector, these arguments will be concatenated to a new "abIndex" object.

Returns

An abstract index vector, i.e., object of class "abIndex".

See Also

the class abIndex documentation; rep2abI() for another constructor; rle (base).

Examples

stopifnot(identical(-3:20, as(abIseq1(-3,20), "vector"))) try( ## (arithmetic) not yet implemented abIseq(1, 50, by = 3) )
  • Maintainer: Martin Maechler
  • License: GPL (>= 2) | file LICENCE
  • Last published: 2025-03-11