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

Like we do for POSIXct/Date/factor. Would likely fix performance issues like in https://github.com/tidyverse/dplyr/issues/5113

type:date-time
dplyr
performance

From https://github.com/r-lib/vctrs/pull/1243#discussion_r484722269 Define naming scheme conventions: - "detect": A logical vector with the same size as `x` - "locate": An integer vector of locations that can be supplied as a...

documentation

``` r library(terra) #> This is terra version 0.7.1 (alpha-release) library(tidyr) #> #> Attaching package: 'tidyr' #> The following objects are masked from 'package:terra': #> #> extract, pack f Error:...

type:s4

https://github.com/tidyverse/dplyr/issues/5339 from @billdenney

type:dataframe
conditions

https://github.com/r-lib/vctrs/blob/657ace5ca7ddeda123c1d661eb9bf88ce84d75d7/R/type-rcrd.R#L86-L90 ```r > x unclass(x[[c(1, 1)]]) $x [1] 1 1 $y [1] 2 2 ``` Should probably be using `vec_as_location2()` somewhere? Or `vec_slice2()`?

type:rcrd

Might need to look for optimization opportunities. We seem to validate that all fields are the same length, but then we also use `df_list()`? This graph comes from `vec_chop()`ping a...

type:rcrd
performance

```r jsonlite::toJSON(vctrs::new_vctr("foo")) ``` gives: ```r Error: No method asJSON S3 class: vctrs_vctr ``` This bubbles up in testthat snapshot testing, which default to jsonlite: ```r testthat::expect_snapshot_value(vctrs::new_vctr("foo")) ``` --- `sessioninfo::session_info()`: ```...

type:vctr

originally from: https://github.com/tidyverse/dplyr/issues/5742 ``` r library(dplyr, warn.conflicts = FALSE) library(vctrs, warn.conflicts = FALSE) suppressPackageStartupMessages(library(bit64)) df % group_by(y) first_i64 #> 1 type_common(first_int) 479.41µs 491.81µs 1878. 2.38KB 0 #> 2 vec_c2(first_int) 2.04ms...

type:integer64

It would be nice to have this in packages that can't use tidyr, and we could probably implement it in a slightly more performant way than tidyr. ```r > tidyr:::expand_grid...

feature

The `tzone` attribute is set for `Sys.time()` but not for `new_datetime()`, this is treated as a meaningful difference. ``` r vctrs::vec_is(Sys.time(), vctrs::new_datetime()) #> [1] FALSE ``` Created on 2020-03-11 by...

type:date-time