Foundations

vec_data() vec_proxy()

Extract underlying data

vec_ptype() vec_ptype_common() vec_ptype_show()

Find the prototype of a set of vectors

vec_size() vec_size_common() vec_is_empty()

Number of observations

vec_assert() vec_is()

Assert an argument has known prototype and/or size

Casting and combining

vec_c()

Combine many vectors into one vector

vec_rbind() vec_cbind()

Combine many data frames into one data frame

Slicing and recycling

vec_init()

Initialize a vector

vec_slice() `vec_slice<-`() vec_assign()

Get or set observations in a vector

vec_recycle() vec_recycle_common()

Vector recycling

Equality and ordering

vec_equal() vec_equal_na()

Test if two vectors are equal

vec_compare()

Compare two vectors

Sorting

vec_order() vec_sort()

Order and sort vectors

Matching and splitting

vec_count()

Count unique values in a vector

vec_duplicate_any() vec_duplicate_detect() vec_duplicate_id() vec_duplicate_all()

Find duplicated values

vec_unique() vec_unique_loc() vec_unique_count()

Find and count unique values

vec_match() vec_in()

Find matching observations across vectors

vec_split()

Split a vector into groups

Sequences and repetitions

vec_repeat()

Expand the length of a vector

vec_seq_along() vec_init_along()

Useful sequences

New classes

list_of() as_list_of() validate_list_of() is_list_of() vec_ptype2(<vctrs_list_of>) vec_cast(<vctrs_list_of>)

list_of S3 class for homogenous lists

Developer tools

new_vctr()

vctr (vector) S3 class

vec_cast() vec_cast_common() vec_restore()

Cast a vector to specified type

vec_list_cast()

Cast a list to vector of specific type

vec_ptype2() vec_default_ptype2()

Find the common type for a pair of vector types

vec_proxy_compare()

Comparison proxy

vec_proxy_equal()

Equality proxy

vec_ptype_full() vec_ptype_abbr()

Vector type as a string

new_partial() is_partial() vec_ptype_finalise()

Partial type

stop_incompatible_type() stop_incompatible_cast() stop_incompatible_op() stop_incompatible_size() maybe_lossy_cast() allow_lossy_cast()

Custom conditions for vctrs package

new_rcrd()

rcrd (record) S3 class

fields() n_fields() field() `field<-`()

Tools for accessing the fields of a record.

s3_register()

Register a method for a suggested dependency

vec_arith() vec_arith_base() MISSING()

Arithmetic operations

vec_math() vec_math_base()

Mathematical operations

unspecified() vec_ptype2(<vctrs_unspecified>)

A 1d vector of unspecified type

vec_default_cast()

Default cast method

vec_as_names()

Retrieve and repair names

vec_as_index() vec_as_position()

Create an index vector or a position