Skip to contents

The altrep class is a raw vector whose value uniquely distinguishes the class from other classes. The altrep class is not the same as the name of the class. For that, you can use alt_classname(). You are unlikely to find much meaning in the actual vector values, but you might find it useful to check if two objects belong to the same class. The other meaningful use of the class is to check its attributes(), but it is recommended that you instead use the dedicated wrapper functions for these attributes: alt_classname(), alt_pkgname(), and alt_type(), or alt_details().

Usage

alt_class(x)

Arguments

x

An ALTREP object of any class

Value

A raw vector uniquely identifying the altrep class of x

Examples

identical(alt_class(1:2), alt_class(2:3))
#> [1] TRUE