head.index0 {index0}R Documentation

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

Description

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

Usage

## 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


[Package index0 version 0.0.1 Index]