minor documentation inaccuracies
khusmann opened this issue · comments
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()].
- For bare a
vctrs_vctr
,quantile()
andmedian()
are not implemented.
#' *
<
,<=
,>=
,>
,min()
,max()
,range()
,median()
,
#'quantile()
, andxtfrm()
methods use [vec_proxy_compare()].
- 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
.
- 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?