vec_proxy_equal: Equality proxy

View source: R/equal.R

vec_proxy_equalR Documentation

Equality proxy


Returns a proxy object (i.e. an atomic vector or data frame of atomic vectors). For vctrs, this determines the behaviour of == and != (via vec_equal()); unique(), duplicated() (via vec_unique() and vec_duplicate_detect()); and anyNA() (via vec_detect_missing()).


vec_proxy_equal(x, ...)



A vector x.


These dots are for future extensions and must be empty.


The default method calls vec_proxy(), as the default underlying vector data should be equal-able in most cases. If your class is not equal-able, provide a vec_proxy_equal() method that throws an error.


A 1d atomic vector or a data frame.

Data frames

If the proxy for x is a data frame, the proxy function is automatically recursively applied on all columns as well. After applying the proxy recursively, if there are any data frame columns present in the proxy, then they are unpacked. Finally, if the resulting data frame only has a single column, then it is unwrapped and a vector is returned as the proxy.


  • vec_proxy() called by default

vctrs documentation built on May 29, 2024, 11:39 a.m.