vctrs icon indicating copy to clipboard operation
vctrs copied to clipboard

Generic programming with typed R vectors

Results 204 vctrs issues
Sort by recently updated
recently updated
newest added

Since in R, `""` and `NA_character_` are never matched as names ``` r library(vctrs) x NA x[NA_character_] #> #> NA # Seems to actually match vec_slice(x, "") #> #> 1...

op:slice
theory

When binding many 1 row tibbles `vec_c()` is 20% to 40% faster than `vec_rbind()`. I would have expected `vec_rbind()` to be faster as this seems to be the main purpose...

op:bind-combine
performance

as a shortcut for `vec_slice(x, rev(seq2(1L, vec_size(x))))` . Reversing the rows in a tibble seems to be surprisingly tricky, `rev()` doesn't do the right thing.

feature

Like the Unix command line `diff`, not `base::diff()`. I added some diff functions to cli, that are internally completely generic, and I think they would work great for vctrs: https://github.com/r-lib/cli/blob/master/R/diff.R...

feature

Currently a vector full of `NA` (or even a `"vctrs_unspecified"`) never changes the type when populated with `vec_slice [1] ``` Created on 2020-07-05 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0) Should this...

op:slice
theory

``` r library(vctrs) x [1] "a" #> #> [[2]] #> [1] "b" "c" #> #> [[3]] #> character(0) vec_chop(x, indices) #> Error: Must subset elements with a valid subscript vector....

Why can we do the first, but not the second? ``` r library(vctrs) x [[1]] #> [1] 2 vec_assign(x, 1, list(2L)) #> Error: Can't convert to . ``` I think...

Reading around this topic, it appears `round()` and `signif()` can either be implemented via the [Math S3 group generic](https://stat.ethz.ch/R-manual/R-devel/library/base/html/groupGeneric.html) or the [Math2 S4 group generic](https://stat.ethz.ch/R-manual/R-devel/library/methods/html/S4groupGeneric.html). {vctrs} implements the S3 generic...

We're already obeying `getOption("max.print")` via `print(format(x))`, but we're still calling `format()` on the full vctr. We could do a better job by providing the necessary infrastructure in `obj_print()` and passing...

feature

This could be the "bracket helper" mentioned in https://github.com/tidyverse/tibble/issues/768 and https://github.com/tidyverse/dplyr/issues/5161#issuecomment-621879379 We would essentially take all the code in [standardize](https://github.com/DavisVaughan/standardize) and move it all to vctrs. I've tried it out...

type:dataframe