new_vctr: vctr (vector) S3 class

Description Usage Arguments Base methods

View source: R/type-vctr.R


This abstract class provides a set of useful default methods that makes it considerably easier to get started with a new S3 vector class. See vignette("s3-vector") to learn how to use it to create your own S3 vector classes.


new_vctr(.data, ..., class = character(), inherit_base_type = FALSE)



Foundation of class. Must be a vector


Name-value pairs defining attributes


Name of subclass.

inherit_base_type \Sexpr[results=rd, stage=render]{vctrs:::lifecycle("experimental")}

Does this class extend the base type of .data? i.e. does the resulting object extend the behaviour the underlying type?

Base methods

The vctr class provides methods for many base generics using a smaller set of generics defined by this package. Generally, you should think carefully before overriding any of the methods that vctrs implements for you as they've been carefully planned to be internally consistent.

vctrs documentation built on Jan. 25, 2020, 1:06 a.m.