minor documentation inaccuracies
Thanks again for this awesome library! I can tell y'all really value your docs, so I wanted to relay some minor (afaikt) inaccuracies I found in the documentation while learning the library that caused me brief confusions:
- This should be
vec_proxy_equal(), notvec_proxy()right?
#' *
==,!=,unique(),anyDuplicated(), andis.na()use #' [vec_proxy()].
https://github.com/r-lib/vctrs/blob/8bf5ba59bae73705f460ef326b725023cff46efa/R/type-vctr.R#L39C1-L40C20
- For bare a
vctrs_vctr,quantile()andmedian()are not implemented.
#' *
<,<=,>=,>,min(),max(),range(),median(), #'quantile(), andxtfrm()methods use [vec_proxy_compare()].
https://github.com/r-lib/vctrs/blob/8bf5ba59bae73705f460ef326b725023cff46efa/R/type-vctr.R#L42C1-L43C68
- vctrs doesn't provide a
vec_arith.double()orvec_arith.integer()S3 generic... it actually only providesvec_arith.numeric()andvec_arith.logical()
vctrs provides the hybrid S3 generics/methods for most of the base R types, like
vec_arith.integer(). If you don't fully import vctrs with@import vctrs, then you will need to explicitly import the generic you are registering double dispatch methods for with@importFrom vctrs vec_arith.integer.
https://github.com/r-lib/vctrs/blob/8bf5ba59bae73705f460ef326b725023cff46efa/vignettes/s3-vector.Rmd#L1317C1-L1319C1
- The documentation for
vec_slice()says it will slice the proxy (if available) and thenvec_restore(). But in type-rcrd.R there's this definition:
`[[.vctrs_rcrd` <- function(x, i, ...) {
out <- vec_slice(vec_data(x), i)
vec_restore(out, x)
}
Does that mean the calls to vec_data() and vec_restore() are technically unnecessary here? Or is there some other magic I'm missing that makes it necessary?