head: Return the First or Last Parts of a Zero-Indexed Object

Description Usage Arguments Details Value

Description

Works like utils::head() and utils::tail().

Usage

1
2
3
4
5
## S3 method for class 'index0'
head(x, ...)

## S3 method for class 'index0'
tail(x, ...)

Arguments

x

An index0 object

...

Other arguments, passed to generic function

Details

Just because an object is zero-indexed, doesn't mean that the definition of, for example, "the first 5 elements" or "the last two elements" has changed. Thus we add methods head() and tail() to ensure they behave as normal.

Value

An index0 object


index0 documentation built on Dec. 3, 2021, 9:06 a.m.