vec_proxy_compare

0th

Percentile

Comparison proxy

Returns a proxy object (i.e. an atomic vector or data frame of atomic vectors). For vctrs, this determins the behaviour of order() and sort() (via xtfrm()); <, >, >= and <= (via vec_compare()); and min(), max(), median(), and quantile().

Keywords
internal
Usage
vec_proxy_compare(x)
Arguments
x

A vector x.

Details

The default method assumes that all classes built on top of atomic vectors or records are orderable. If your class is not, you will need to provide a vec_proxy_compare() method that throws an error. Note that the default vec_proxy_equal() method calls vec_proxy_compare() so if your object is equal-able but not comparable, you'll need to provide methods for both generics.

Value

A 1d atomic vector or a data frame.

Aliases
  • vec_proxy_compare
Documentation reproduced from package vctrs, version 0.1.0, License: GPL-3

Community examples

Looks like there are no examples yet.