c.index0: Combine zero-indexed vectors

Description Usage Arguments Value See Also Examples

View source: R/c.R

Description

When combining vectors, if the first argument to c() is zero-indexed, then the result will be zero-indexed as well. Otherwise, the output will revert to default R behaviour of indexing from 1.

Usage

1
2
## S3 method for class 'index0'
c(...)

Arguments

...

objects to be concatenated. All NULL entries are dropped.

Value

A zero-indexed vector of class index0.

See Also

base::c()

Examples

1
2
3
4
x <- as.index0(1:5)
y <- as.index0(6:10)
c(x, y)
c(1:5, y)

Selbosh/index0 documentation built on Dec. 18, 2021, 1:04 p.m.