Davis Vaughan
Davis Vaughan
We do have a few other tools that can do this! ``` r library(vctrs) df [1] 1 2 3 4 2 1 7 4 # Identify groups of values in...
Related to #1452, since we could use `vec_duplicate_detect(x, ignore = "first/last")` there to match `anyDuplicated(x)` and `anyDuplicated(x, fromLast = TRUE)`
The `as.list()` names handling behavior of the vctrs_vctr class is really inherited from `vec_chop()`. Because `vec_chop()` allows you to specify `indices` which can result in >1 observations per element of...
I do this in clock too, since formatting the whole date-time / calendar object can be slow https://github.com/r-lib/clock/blob/3f3636a876718fa1e9ad5357f404152bdc57c443/R/calendar.R#L3-L29
I've fought with this before, and I'm pretty sure it is an R limitation with how custom `
I don't think the reference count inside `vec_slice
So you think we can imitate the efficient `[ vec_init() #> 2 alloc 4000048 test() -> vec_slice 3 alloc 4000048 test() -> vec_slice 4 alloc 4000048 test() -> vec_slice total...
FWIW the dplyr functions are now based on a common (not exposed) `shift()` helper https://github.com/tidyverse/dplyr/blob/17c7a5d8d208f3c89d023c4735c14a74ee336dbd/R/lead-lag.R#L89 I do think that would be useful as a helper outside of dplyr, but im...
@lionel- I'm not sure that #1711 actually closes this issue. This is purely about the fact that we should reference the correct argument name, `x_arg`, in the error message when...
Oh wait, you think that `1` should be an allowed value for `x_arg`?? That seems so strange to me 😆 I was expecting that it would be something that passes...