Davis Vaughan

Results 746 comments of Davis Vaughan

I think this would be solved by https://github.com/r-lib/vctrs/pull/1231, which adds that missing cast method But note that `[

You think `[ [1] 2 vec_assign(x, 1, 3) #> Error in `vec_assign()`: #> ! Can't convert to . ``` Created on 2022-10-03 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)

It is somewhat confusing that `vec_ptype_abbr()` and `vec_ptype_full()` can utilize inheritance, meaning that the `vec_ptype_abbr.Date` method is hit here, which is why the results look so confusing. ``` r library(vctrs)...

See also https://github.com/tidyverse/dplyr/issues/6230#issuecomment-1100660750

I now feel somewhat strongly that a more flexible API is: ```r vec_any_missing(x) vec_all_complete(x) vec_detect_missing(x) (vec_equal_na) vec_detect_complete(x) ``` Which get combined like: ```r if (vec_any_missing(x)) { x

We already have `vec_detect_complete()`, `vec_equal_na()`, and `vec_any_missing()`, so the only thing we are missing here is `vec_all_complete()`.

You do currently have to supply `@method` for `vec_arith`. There was a change in R 4.0.0 related to S3 method lookup, and I'm pretty sure that is why it "works"...

Just want to second Lionel that we really appreciate your efforts in trying to improve vctrs!

Original issue where we flipped it to `FALSE` https://github.com/r-lib/vctrs/pull/778 Because we don't support inheritance in double dispatch anymore, this comment doesn't really apply as much right? https://github.com/r-lib/vctrs/pull/777#issuecomment-577110394

Consider `vec_count()` output, i.e. #1632